ACL notifications
acl_context_authenticated acl_is_allowed acl_is_allowed_prop acl_is_owner acl_logoff acl_logon acl_mqtt acl_user_groups
Authentication notifications
auth_checked auth_confirm auth_confirm_done auth_client_logon_user auth_client_switch_user auth_logon auth_logoff auth_options_update auth_postcheck…
Dispatch notifications
content_types_dispatch dispatch dispatch_host dispatch_rewrite page_url url_abs url_rewrite
Edge notifications
edge_delete edge_insert edge_update
E-mail notifications
email_add_handler email_bounced email_dkim_options email_drop_handler email_ensure_handler email_failed email_is_blocked email_received email_send_encoded…
Import/export notifications
import_csv_definition import_resource export_resource_content_disposition export_resource_content_type export_resource_data export_resource_encode…
Media notifications
media_identify_extension media_identify_file media_import media_import_medium media_preview_options media_import_props media_replace_file media_stillimage…
Pivot notifications
pivot_fields pivot_rsc_data pivot_update custom_pivot
Resource notifications
rsc_delete rsc_get rsc_import_fetch rsc_insert rsc_merge rsc_pivot_done rsc_query_item rsc_update rsc_update_done rsc_upload
Survey notifications
survey_get_handlers survey_is_allowed_results_download survey_is_submit survey_submit
User notifications
identity_password_match identity_verification identity_verified logon_options logon_ready_page logon_submit set_user_language request_context session_context…
Other notifications
action_event_type activity activity_send admin_edit_blocks admin_menu admin_rscform category_hierarchy_save comment_insert cors_headers debug debug_stream…

Validators Reference Installation requirements

All Notifications

acl_context_authenticated

Set the context to a typical authenticated user. Used by m_acl.erl

acl_is_allowed

Check if a user is authorized to perform an operation on a an object (some resource or module). Observe this…

acl_is_allowed_prop

Check if a user is authorizded to perform an action on a property. Defaults to true .

acl_is_owner

Check if a user is the owner of a resource. id is the resource id.

acl_logoff

Clear the associated access policy for the context.

acl_logon

Initialize context with the access policy for the user.

acl_mqtt

MQTT acl check, called via the normal acl notifications. Actions for these checks: subscribe, publish

acl_user_groups

Return the groups for the current user.

action_event_type

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

activity

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

activity_send

Push a list of activities via a ‘channel’ (eg ‘email’) to a recipient. The activities are a list of #activity{} records.

admin_edit_blocks

Used in the admin to fetch the possible blocks for display

admin_menu

Used for fetching the menu in the admin.

admin_rscform

Used in the admin to process a submitted resource form

auth_checked

Fold over the context after logon of user with username, communicates valid or invalid password

auth_client_logon_user

Send a request to the client to login an user. The zotonic.auth.worker.js will send a request to…

auth_client_switch_user

Send a request to the client to switch users. The zotonic.auth.worker.js will send a request to…

auth_confirm

Confirm a user id.

auth_confirm_done

A user id has been confirmed.

auth_logoff

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

auth_logon

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

auth_options_update

Update the given (accumulator) authentication options with the request options. Note that the request options are from…

auth_postcheck

First for logon of user with username, called after successful password check.

auth_precheck

First for logon of user with username, check for ratelimit, blocks etc.

auth_reset

First to check for password reset forms, return undefined, ok, or {error, Reason}.

auth_validate

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

auth_validated

Authentication against some (external or internal) service was validated

category_hierarchy_save

Save (and update) the complete category hierarchy

comment_insert

Notification to signal an inserted comment. ‘comment_id’ is the id of the inserted comment, ‘id’ is the id of the…

content_types_dispatch

Get available content types and their dispatch rules Example: {“text/html”, page} A special dispatch rule is ‘page_url’

cors_headers

Set CORS headers on the HTTP response.

custom_pivot

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

debug

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

debug_stream

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

dispatch

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

dispatch_host

Try to find the site for the request Called when the request Host doesn’t match any active site.

dispatch_rewrite

Rewrite a URL before it will be dispatched using the z_sites_dispatcher

dropbox_file

Handle a new file received in the ‘files/dropbox’ folder of a site. Unhandled files are deleted after a hour.

edge_delete

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

edge_insert

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

edge_update

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

email_add_handler

Add a handler for receiving e-mail notifications

email_bounced

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

email_dkim_options

Return the options for the DKIM signature on outgoing emails. Called during email encoding.

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_ensure_handler

Add a handler for receiving e-mail notifications

email_failed

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_received

Notification sent to a site when e-mail for that site is received

email_send_encoded

Add a handler for receiving e-mail notifications

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_status

Email status notification, sent when the validity of an email recipient changes

export_resource_content_disposition

mod_export - return the {ok, Disposition} for the content disposition.

export_resource_data

mod_export - fetch a row for the export, can return a list of rows, a binary, and optionally a continuation state.

export_resource_encode

mod_export - Encode a single data element.

export_resource_filename

mod_export - return the {ok, Filename} for the content disposition.

export_resource_footer

mod_export - Fetch the footer for the export. Should cleanup the continuation state, if needed.

export_resource_header

mod_export - Fetch the header for the export.

export_resource_visible

mod_export - Check if the resource or dispatch is visible for export.

filewatcher

Broadcast some file changed, used for livereload by mod_development

hierarchy_updated

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

http_log_access

Access log event for http. Called from the z_stats.

identity_password_match

Notification that a user’s identity has been verified.

identity_verification

Request to send a verification to the user. Return ok or an error Identity may be undefined, or is a identity used for…

identity_verified

Notification that a user’s identity has been verified.

import_csv_definition

Find an import definition for a CSV file by checking the filename of the to be imported file.

import_resource

An external feed delivered a resource. First handler can import it. Return:: {ok, m_rsc:resource_id()} , {error

language

Notify that the session’s language has been changed

logon_options

Check for logon options, called if logon_submit returns undefined . This is used to fetch external (or local…

logon_ready_page

Check where to go after a user logs on.

logon_submit

Handle a user logon. The posted query args are included. Return:: {ok, UserId} or {error, Reason}

mailinglist_mailing

Send a page to a mailinglist (notify) Use {single_test_address, Email} when sending to a specific e-mail address.

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_config_update

Site configuration parameter was changed

m_config_update_prop

Site configuration parameter was changed

media_identify_extension

Try to find a filename extension for a mime type (example: “.jpg”)

media_identify_file

Try to identify a file, returning a map with file properties.

media_import

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

media_import_medium

Notification to import a medium record from external source. This is called for non-file medium records, for example…

media_import_props

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

media_preview_options

Modify the options for an image preview url or tag. This is called for every image url generation, except if the…

media_replace_file

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

media_stillimage

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

media_update_done

Media update done notification. action is ‘insert’, ‘update’ or ‘delete’

media_upload_preprocess

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

media_upload_props

Notification that a medium file has been uploaded. This is the moment to change properties, modify the file etc. The…

media_upload_rsc_props

Notification that a medium file has been uploaded. This is the moment to change resource properties, modify the file…

media_viewer

Request to generate a HTML media viewer for a resource

menu_rsc

Fetch the menu id belonging to a certain resource

menu_save

Save the menu tree of a menu resource

module_activate

A module has been activated and started.

module_deactivate

A module has been stopped and deactivated.

multiupload

Handle an uploaded file which is part of a multiple file upload from a user-agent. The upload is a #upload record or a…

output_html

Fold for mapping non-iolist output to iolist values. Used when outputting a rendered HTML tree. Folded accumulator is:…

page_url

Fetch the url of a resource’s html representation

pivot_fields

Foldr to change or add pivot fields for the main pivot table. The rsc contains all rsc properties for this resource

pivot_rsc_data

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

pivot_update

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

postback_event

Message sent by a user-agent on a postback event. Encapsulates the encoded postback and any additional data. This is…