Models

rsc
The main resource model, which is the central part of the Zotonic data model. This model provides an interface to all resource ("page") information. It also…
category
This model can retrieve information about the resource category hierarchy in different ways.
media
Access to data about uploaded files and other media.
identity
The m_identity model manages usernames and other user identities. mod_authentication uses it to store and check salted passwords, but also provides a safe…
rsc_gone
This model tracks deleted resources (see m_rsc). Its primary goal is to be able to determine if a resource never existed, has been deleted or has been replaced…
edge
Access information about page connections.
template
Model for dynamic template rendering. It renders a template path passed in the request path and returns the rendered template output.
development
Model for development and diagnostics controls, including tracing flags, observer lists, cache/compile/reindex actions, and dispatch info.
backup
Model for backup configuration and operational status, including backup permissions, listing, directory, encryption settings, and active backup state.
auth2fa
Model for two-factor authentication state and setup, including TOTP QR/image generation, mode checks, reset checks, and clock skew checks.
authentication
Model for authentication state and login support checks, including password authentication flow helpers and reminder/verification actions.
config
Zotonic has two places where a site's configuration is kept:
site
Retrieve information that is stored in the site configuration. If you want to query values from the config table instead, you should use m_config.
admin_config
Model for admin configuration views, including SSL certificate info, security directory info, and selected module config values.
l10n
Model for localization helpers, including countries, country names, available timezones, and site timezone settings.
custom_redirect
Model for custom redirect records, exposing redirect list and individual redirect lookup by id.
acl_user_group
Model for ACL user-group helper values in mod_acl_user_groups, including collaboration-group settings and category usage checks.
acl
The m_acl model gives access the id of the currently logged in user, and provides a mechanism to do basic access control checks.
admin_status
Model for admin status endpoints, including Zotonic version and health/status overview values.
mailinglist
Model for mailinglist operations and reporting, including recipient counts, delivery stats, subscriptions, and scheduled mailings.
search
The m_search model provides access to different kinds of search queries for searching through models.
predicate
Retrieve information about predicates. Predicates are the labels on edges (connections between resources) that give meaning to an edge. An example is the…
facebook
Model for Facebook integration helpers, including auth-use flag, profile picture fetch, and Graph API proxy calls.
survey
Model for survey reporting and participant state, including results, totals, per-user answers, exports, and result handlers.
log
Model for runtime logging state and access to server log entries for clients allowed to read logs.
client_local_storage
Model to access the localStorage on the client (browser).
tkvstore
Simple read-only interface to the typed key-value store of mod_tkvstore. To get a value from the store: use m.tkvstore.type.key, like this:
log_email
Model for email log lookups used by logging/admin views.
acl_rule
Model for ACL rule inspection and helper checks in mod_acl_user_groups, including insert/move checks, upload limits, mime checks, and ACL state lookups.
oauth2
Model for OAuth2 app/client/token administration and user token listings.
log_ui
Model for admin UI log retrieval by index, gated by admin permissions.
ratelimit
Model for exposing current ratelimit timeout information for the active request context.
modules
Access information about which modules are installed and which ones are active.
translation
The m_translation model gives easy access to language and translation related information.
comment
Model for comments attached to resources. It provides listing, moderation checks, counting, and retrieval of individual comments.
seo
Model for SEO-related settings and generated SEO metadata, including webmaster verification keys, analytics settings, and JSON-LD output.
admin_blocks
Model for listing editable content blocks for a resource in the admin interface.
client_session_storage
Model to access the sessionStorage on the client (browser).
admin_menu
This model holds the admin menu, which is built up by calling each module to add items to the menu.
server_storage
Model to access the server side storage of data.
editor_tinymce
Model exposing TinyMCE editor version metadata used by admin/editor integration.
hierarchy
The category hierarchy tables have been replaced by m_hierarchy . This model defines named hierarchies of resources (pages).
req
This model gives access to the request variables from within a template.
sysconfig
Note
admin_identity
Model for admin identity configuration values, including password policy regex and default category/content-group for new users.
email_status
Tracks the send/bounce/error status of all outgoing emails.
content_group
Model for content-group checks, currently exposing whether a content group is in use.
backup_revision
Model for resource revision backup metadata, including revision list/title retrieval and revision retention settings.
import_csv_data
Model to track resources imported from CSV and XLSX files.
filestore
The filestore uses two tables for its administration.
ssl_letsencrypt
Model for Let's Encrypt status information, available to administrators.
email_receive_recipient
Model for received-email recipient extraction and matching used by mod_email_receive.
admin
This model exposes some meta-information for the use in mod_admin templates.
linkedin
Model for LinkedIn integration helpers, currently exposing whether LinkedIn auth integration is enabled.
email_dkim
DomainKeys Identified Mail Signatures (RFC 6376) is a method to add a signature to outgoing emails. This enables recipients to check who sent an email and if…
mqtt_ticket
A ticketing system for out of band MQTT posts via HTTP.
oauth2_service
Model for OAuth2 service flow helpers, including redirect URL generation and oauth redirect processing.
site_update
Model for checking if a site has version control enabled.
fileuploader
Model to start uploads, upload a block and delete uploads.
microsoft
Check with useauth if the authentication using the Microsoft identity platform is enabled and configured.
seo_sitemap
Model for sitemap generation metadata, including available urlsets and paged urlset export values.
signup
Exported APIs:
image_edit
Manages the medium_edit_settings property for non destructive image editing.
oauth2_consumer
Model for OAuth2 consumer configuration and token access, including consumer lists and per-consumer token retrieval.
admin_note
Add an editorial note to any resource.
rdf
Model for RDF summaries of resources. It provides short RDF-oriented summary maps for resources, with translated and non-translated variants.
search_status
Model for search subsystem status, including facet table health checks and facet definition metadata.
copyright
Model for copyright and rights metadata helpers, including Creative Commons lists, rights statement lookup, and attribution/year values.
email_relay
Model for email relay API endpoints, handling relay delivery requests and relay status updates.
dispatch
Dispatch or generate URLs or page paths. Useful to check dispatch rules or for client side code to dispatch page paths.

Global template variables Reference Validators

All Models

acl

The m_acl model gives access the id of the currently logged in user, and provides a mechanism to do basic access…

acl_rule

Model for ACL rule inspection and helper checks in mod_acl_user_groups, including insert/move checks, upload limits

acl_user_group

Model for ACL user-group helper values in mod_acl_user_groups, including collaboration-group settings and category…

admin

This model exposes some meta-information for the use in mod_admin templates.

admin_blocks

Model for listing editable content blocks for a resource in the admin interface.

admin_config

Model for admin configuration views, including SSL certificate info, security directory info, and selected module…

admin_identity

Model for admin identity configuration values, including password policy regex and default category/content-group for…

admin_menu

This model holds the admin menu, which is built up by calling each module to add items to the menu.

admin_note

Add an editorial note to any resource.

admin_status

Model for admin status endpoints, including Zotonic version and health/status overview values.

auth2fa

Model for two-factor authentication state and setup, including TOTP QR/image generation, mode checks, reset checks, and…

authentication

Model for authentication state and login support checks, including password authentication flow helpers and reminder…

backup

Model for backup configuration and operational status, including backup permissions, listing, directory, encryption…

backup_revision

Model for resource revision backup metadata, including revision list/title retrieval and revision retention settings.

category

This model can retrieve information about the resource category hierarchy in different ways.

client_local_storage

Model to access the localStorage on the client (browser).

client_session_storage

Model to access the sessionStorage on the client (browser).

comment

Model for comments attached to resources. It provides listing, moderation checks, counting, and retrieval of individual…

config

Zotonic has two places where a site's configuration is kept:

content_group

Model for content-group checks, currently exposing whether a content group is in use.

copyright

Model for copyright and rights metadata helpers, including Creative Commons lists, rights statement lookup, and…

custom_redirect

Model for custom redirect records, exposing redirect list and individual redirect lookup by id.

development

Model for development and diagnostics controls, including tracing flags, observer lists, cache/compile/reindex actions

dispatch

Dispatch or generate URLs or page paths. Useful to check dispatch rules or for client side code to dispatch page paths.

edge

Access information about page connections.

editor_tinymce

Model exposing TinyMCE editor version metadata used by admin/editor integration.

email_dkim

DomainKeys Identified Mail Signatures (RFC 6376) is a method to add a signature to outgoing emails. This enables…

email_receive_recipient

Model for received-email recipient extraction and matching used by mod_email_receive.

email_relay

Model for email relay API endpoints, handling relay delivery requests and relay status updates.

email_status

Tracks the send/bounce/error status of all outgoing emails.

facebook

Model for Facebook integration helpers, including auth-use flag, profile picture fetch, and Graph API proxy calls.

filestore

The filestore uses two tables for its administration.

fileuploader

Model to start uploads, upload a block and delete uploads.

hierarchy

The category hierarchy tables have been replaced by m_hierarchy . This model defines named hierarchies of resources…

identity

The m_identity model manages usernames and other user identities. mod_authentication uses it to store and check salted…

image_edit

Manages the medium_edit_settings property for non destructive image editing.

import_csv_data

Model to track resources imported from CSV and XLSX files.

l10n

Model for localization helpers, including countries, country names, available timezones, and site timezone settings.

linkedin

Model for LinkedIn integration helpers, currently exposing whether LinkedIn auth integration is enabled.

log

Model for runtime logging state and access to server log entries for clients allowed to read logs.

log_email

Model for email log lookups used by logging/admin views.

log_ui

Model for admin UI log retrieval by index, gated by admin permissions.

mailinglist

Model for mailinglist operations and reporting, including recipient counts, delivery stats, subscriptions, and…

media

Access to data about uploaded files and other media.

microsoft

Check with useauth if the authentication using the Microsoft identity platform is enabled and configured.

modules

Access information about which modules are installed and which ones are active.

mqtt_ticket

A ticketing system for out of band MQTT posts via HTTP.

oauth2

Model for OAuth2 app/client/token administration and user token listings.

oauth2_consumer

Model for OAuth2 consumer configuration and token access, including consumer lists and per-consumer token retrieval.

oauth2_service

Model for OAuth2 service flow helpers, including redirect URL generation and oauth redirect processing.

predicate

Retrieve information about predicates. Predicates are the labels on edges (connections between resources) that give…

ratelimit

Model for exposing current ratelimit timeout information for the active request context.

rdf

Model for RDF summaries of resources. It provides short RDF-oriented summary maps for resources, with translated and…

req

This model gives access to the request variables from within a template.

rsc

The main resource model, which is the central part of the Zotonic data model. This model provides an interface to all…

rsc_export

Export a full resource representation for API and model access.

rsc_gone

This model tracks deleted resources (see m_rsc). Its primary goal is to be able to determine if a resource never…

rsc_import

Import model for resources exported by m_rsc_export .

rsc_update

Resource update helper module used by m_rsc .

search

The m_search model provides access to different kinds of search queries for searching through models.

search_status

Model for search subsystem status, including facet table health checks and facet definition metadata.

seo

Model for SEO-related settings and generated SEO metadata, including webmaster verification keys, analytics settings

seo_sitemap

Model for sitemap generation metadata, including available urlsets and paged urlset export values.

server_storage

Model to access the server side storage of data.

signup

Exported APIs:

site

Retrieve information that is stored in the site configuration. If you want to query values from the config table…

site_update

Model for checking if a site has version control enabled.

ssl_letsencrypt

Model for Let's Encrypt status information, available to administrators.

survey

Model for survey reporting and participant state, including results, totals, per-user answers, exports, and result…

survey_saved

Model for saving and retrieving intermediate survey answers for users. There can only be a single intermediate result…

template

Model for dynamic template rendering. It renders a template path passed in the request path and returns the rendered…

tkvstore

Simple read-only interface to the typed key-value store of mod_tkvstore. To get a value from the store: use m.tkvstore.

translation

The m_translation model gives easy access to language and translation related information.

zotonic_status

Model for system-wide site status information.