Text

All Text

dispatch

Dispatch rules Name Path Resource Args admin_predicate [“admin”,”predicate”] controller_admin [{acl_module

dispatch

Dispatch rules Name Path Resource Args admin_config [“admin”,”config”] controller_admin_config [seo_noindex]…

dispatch

Dispatch rules Name Path Resource Args acl_rule_test [“acl”,”rules”,”test”] controller_template [{template

observe_media_replace_file/2

Notification that a medium file has been changed (notify) The id is the resource id, medium contains the medium’s…

dispatch-cotonic

Dispatch rules Name Path Resource Args mqtt_transport [“mqtt-transport”] controller_mqtt_transport []…

email_receive_recipient

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

ssl_letsencrypt

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

filestore

The filestore uses two tables for its administration.

dispatch

Dispatch rules Name Path Resource Args admin_comments [“admin”,”comments”] controller_admin_comments [seo_noindex]…

dispatch

Dispatch rules Name Path Resource Args zotonic_sites_add [“zotonic”,”sites”,”add”] controller_zotonic_status…

observe_edge_update/2

An edge has been updated Note that the Context for this notification does not have the user who updated the edge.

observe_auth_logon/3

User logs on. Add user-related properties to the logon request context.

observe_pivot_update/3

Pivot just before a m_rsc_update update. Used to pivot fields before the pivot itself.

dispatch

Dispatch rules Name Path Resource Args contact [“contact”] controller_page [{template,”contact.tpl”},{id

import_csv_data

Model to track resources imported from CSV and XLSX files.

backup_revision

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

tests

Dispatch rules Name Path Resource Args hello_world [“test”,”hello_world”] controller_hello_world []…

mod_linkedin

The mod_linkedin module plugs into the authentication system to enable LinkedIn login on your site.

dispatch

Dispatch rules Name Path Resource Args linkedin_authorize [“oauth-service”,”authorize”,”linkedin”]…

observe_edge_delete/2

An edge has been deleted Note that the Context for this notification does not have the user who deleted the edge.

observe_auth_validate/2

First to validate a password. Return \{ok, RscId\} or \{error, Reason\}.

dispatch

Dispatch rules Name Path Resource Args facebook_authorize [“oauth-service”,”authorize”,”facebook”]…

dispatch

Dispatch rules Name Path Resource Args letsencrypt_challenge [“.well-known”,”acme-challenge”,token]…

observe_mailinglist_message/2

Send a welcome or goodbye message to the given recipient. The recipient is either a recipient-id or a recipient props.

content_group

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

All dispatch rules

All the dispatch rules from all modules. For a background on dispatch rules, see The URL dispatch system.

Predicates and Connections

dialog_predicate_new link unlink

Events

postback trigger_event publish

Editor

editor_add editor_remove zlink zmedia zmedia_choose zmedia_has_chosen

publish

Publishes a message on the topic tree of the current page.

trigger_event

Trigger a named \{% wire %\} with an action. All args will be args to the named wire. The trigger’s name argument is…

zmedia

Used for triggering the insertion of a media item in the TinyMCE editor in the admin.

mod_artwork

This module contains many useful icons and images.

mod_email_status

This module tracks for all outgoing email addresses:

email_status

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

admin_identity

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

survey

Dispatch rules Name Path Resource Args survey_results_download [“survey”,”results”,”download”,id]…

observe_email_sent/2

Notify that we could NOT send an e-mail (there might be a bounce later...) The Context is the depickled z_email:send/2…

observe_email_is_blocked/2

Check if an email address is blocked

observe_email_drop_handler/2

Drop an e-mail handler for a user/resource id. (notify). The notification, user and resource should be the same as when…

observe_email_bounced/2

Bounced e-mail notification. The recipient is the e-mail that is bouncing. When the the message_nr is unknown the it is…

dispatch

Dispatch rules Name Path Resource Args id [“id”,id] controller_id [] lib [“lib”,’*’] controller_file [{root

observe_auth_confirm_done/2

A user id has been confirmed.

req

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

hierarchy

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

zlink

Used for inserting an internal link in the TinyMCE editor in the admin.

editor_tinymce

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

logoff

This action logs off the current user and reloads the current page as the anonymous visitor.

User

auth_disconnect delete_username dialog_delete_username dialog_set_username_password dialog_user_add logoff…

observe_custom_pivot/2

Add custom pivot fields to a resource’s search index (map) Result is a single tuple or list of tuples `{pivotname

server_storage

Model to access the server side storage of data.

Other notifications

action_event_type activity activity_send admin_edit_blocks admin_menu admin_rscform category_hierarchy_save…

Pivot notifications

pivot_fields pivot_rsc_data pivot_update custom_pivot

Media notifications

media_identify_extension media_identify_file media_import media_import_medium media_preview_options media_import_props…

E-mail notifications

email_add_handler email_bounced email_dkim_options email_drop_handler email_ensure_handler email_failed…

Edge notifications

edge_delete edge_insert edge_update

mod_email_relay

This module supports relaying email between Zotonic servers.

mod_email_receive

Enables the Zotonic site to receive emails for the site’s users. The user’s email address is username@hostname, where…

The addsite command

Adding a site to Zotonic is done through the zotonic shell command. It syntax is like this:

admin_menu

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

observe_m_config_update_prop/2

Site configuration parameter was changed

client_session_storage

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

module_rescan

Rescans all modules, to find all templates, lib files, dispatch rules, etc. again.

Modules (Admin)

module_rescan module_toggle

editor_add

Add WYSIWYG editor controls to all textarea’s with the z_editor class in the target.

observe_menu_rsc/2

Fetch the menu id belonging to a certain resource

observe_auth_checked/2

Notify after logon of user with username, communicates valid or invalid password

dialog_set_username_password

Show a dialog for setting a username / password on the given resource (which is usually a person).

dispatch

Dispatch rules Name Path Resource Args sitemap_xml [“sitemap.xml”] controller_template [{template,”sitemap.tpl”}

delete_username

Delete the username from a user, no confirmation.

admin_blocks

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

dialog_delete_username

Open a dialog to confirm the deletion of the username of a user.

backup

Dispatch rules Name Path Resource Args admin_backup [“admin”,”backup”] controller_admin_backup [seo_noindex]…

seo

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

observe_debug/2

Push some information to the debug page in the user-agent. Will be displayed with io_lib:format(“~p: ~p~n”, [What

zmedia_has_chosen

Used by the admin as a callback when a media file has been selected for insertion into the rich-text editor.

observe_hierarchy_updated/2

Signal that the hierarchy underneath a resource has been changed by mod_menu

observe_category_hierarchy_save/2

Save (and update) the complete category hierarchy

comment

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

translation

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

mod_search

mod_search implements various ways of searching through the main resource table using m_search.

dialog_media_upload

Shows the admin dialog for uploading a media item. See Media.

dialog_edit_basics

Open a dialog to edit the “basic” information of a resource.

dialog_delete_rsc

Open a dialog to confirm the deletion of a resource.

delete_media

Delete a media file from a resource, without confirmation.

Resources

delete_media delete_rsc dialog_delete_rsc dialog_duplicate_rsc dialog_edit_basics dialog_media_upload dialog_new_rsc…

observe_pivot_rsc_data/3

Fold over the resource props map to extend/remove data to be pivoted

observe_rsc_upload/2

Upload and replace the resource with the given data. The data is in the given format.

observe_rsc_update/3

An updated resource is about to be persisted. Observe this notification to change the resource properties before they…

observe_rsc_query_item/2

Send a notification that the resource ‘id’ is added to the query query_id.

observe_rsc_delete/2

Resource will be deleted. This notification is part of the delete transaction, it’s purpose is to clean up associated…

Resource notifications

rsc_delete rsc_get rsc_import_fetch rsc_insert rsc_merge rsc_pivot_done rsc_query_item rsc_update rsc_update_done…

overlay_close

Closes the currently open overlay. When there is no overlay open then nothing happens.

Dialogs

dialog dialog_open dialog_close overlay_open overlay_close

modules

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

User management

Create new users In the admin, under ‘Auth’ > ‘Users’ you can find a list of all users. Use the ‘Make a new user’…

observe_auth_logoff/3

User is about to log off. Modify (if needed) the logoff request context.