Text

All Text

mod_audio

Adds support for viewing and handling audio medium items.

Release 0.54.2

Welcome to Zotonic 0.54.2, released on August 4, 2020.

dispatch

Dispatch rules Name Path Resource Args oauth2_consumer_authorize [“oauth-service”,”authorize”,”zotonic”

m_oauth2_service

Not yet documented.

m_mqtt_ticket

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

m_email_dkim

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

Release 0.54.1

Welcome to Zotonic 0.54.1, released on June 16, 2020.

Release 0.56.1

Welcome to Zotonic 0.56.1, released on June 16, 2020.

Directory structure

Zotonic is a set of regular OTP applications. These can be found in the repository’s apps/ directory:

Reference

All the nitty gritty details when the big picture has settled.

mod_acl_mock

Mocking module for access control during tests.

User Guide

Welcome to the Zotonic User Guide. This guide is a non-technical introduction to Zotonic.

m_linkedin

Not yet documented.

m_admin

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

ACL options

Authorization checks to perform, in addition to the acl_action dispatch option, can be given in the acl dispatch option

edge_insert

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

auth_validated

Authentication against some (external or internal) service was validated

mod_import_wordpress

Import WordPress .wxr files in your site.

media_import_props

Notification to translate or map a file after upload, before insertion into the database Used in mod_video to queue…

media_stillimage

See if there is a ‘still’ image preview of a media item. (eg posterframe of a movie) Return:: {ok, ResourceId} or…

tkvstore_put

Put a value into the typed key/value store

tkvstore_delete

Delete a value from the typed key/value store

security_headers

Check and possibly modify the http response security headers All headers are in lowercase.

scomp_script_render

Add extra javascript with the {% script %} tag. (map) Used to let modules inject extra javascript depending on the…

module_deactivate

A module has been stopped and deactivated.

m_config_update

Site configuration parameter was changed

language

Notify that the session’s language has been changed

dispatch

Final try for dispatch, try to match the request. Called when the site is known, but no match is found for the path

admin_rscform

Used in the admin to process a submitted resource form

activity

An activity in Zotonic. When this is handled as a notification then return a list of patterns matching this activity.

action_event_type

Render the javascript for a custom action event type. The custom event type must be a tuple, for example: {% wire…

dispatch_translation

Dispatch rules Name Path Resource Args admin_translation [“admin”,”translation”] controller_admin [{acl_module

dispatch

Dispatch rules Name Path Resource Args signup [“signup”] controller_signup [] signup_confirm [“signup”,”confirm”]…

dispatch_mailinglist

Dispatch rules Name Path Resource Args admin_mailinglist [“admin”,”mailinglists”] controller_admin_mailinglist…

development

Dispatch rules Name Path Resource Args admin_development [“admin”,”development”] controller_admin [{template

dispatch

Dispatch rules Name Path Resource Args admin_custom_redirect [“admin”,”custom-redirect”] controller_admin…

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

media_replace_file

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 []…

m_email_receive_recipient

Not yet documented.

m_ssl_letsencrypt

Not yet documented.

m_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…

edge_update

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

auth_logon

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

pivot_update

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

m_import_csv_data

Not yet documented.

debug_stream

Internal message of mod_development. Start a stream with debug information to the user agent. ‘target’ is the id of the…

m_backup_revision

Not yet documented.

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 systen to enable LinkedIn login on your site.

dispatch

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

edge_delete

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

auth_validate

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]…

mailinglist_message

Send a welcome or goodbye message to the given recipient. The recipient is either an e-mail address or a resource id.

m_content_group

Not yet documented.

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 the…

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:

m_email_status

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

m_admin_identity

Not yet documented.

survey

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

email_sent

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

email_is_blocked

Check if an email address is blocked

email_drop_handler

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

email_bounced

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

m_sysconfig

Gives access to the Zotonic system configuration from the zotonic.config file(s).

dispatch

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

auth_confirm_done

A user id has been confirmed.

m_req

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

m_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.

m_editor_tinymce

Not yet documented.

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…

custom_pivot

Add custom pivot fields to a resource’s search index (map) Result is a list of {module, props} pairs. This will update…

m_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

Enables the Zotonic site to relay emails for the site’s users to their real email addresses.

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:

m_admin_menu

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