ACL notifications
acl_context_authenticated acl_is_allowed acl_is_allowed_prop acl_is_owner acl_logoff acl_logon acl_mqtt acl_user_groups acl_user_groups_modify…
Authentication notifications
auth_checked auth_confirm auth_confirm_done auth_client_logon_user auth_client_switch_user auth_identity_types auth_logon auth_logoff auth_options_update…
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_is_recipient_ok email_received…
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 survey_result_columns survey_result_column_values
User notifications
identity_password_match identity_verification identity_verified identity_update_done logon_options logon_ready_page logon_submit set_user_language…
Other notifications
action_event_type activity activity_send admin_edit_blocks admin_menu admin_rscform category_hierarchy_save comment_insert content_security_header cors_headers…

Validators Reference Installation requirements

All Notifications

acl_collab_groups_modify

Modify the list of collaboration groups of a user. Called internally by the ACL modules when fetching the list of…

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.

acl_user_groups_modify

Modify the list of user groups of a user. Called internally by the ACL modules when fetching the list of user groups a…

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

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

auth_client_logon_user

Send a request to the client to login a 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_identity_types

Return the list of identity types that allow somebody to logon and become an active user of the system. Defaults to […

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_security_header

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

content_types_dispatch

Get available content types and their dispatch rules Example: {{<<”text”>>, <<”html”>>, []}, page} A special dispatch…

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 single tuple or list of tuples {pivotname

debug

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

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_is_recipient_ok

Check if an email address is safe to send email to. The email address is not blocked and is not marked as bouncing.

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_content_type

mod_export - Determine the mime type for the export.

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

Check if passwords are matching. Uses the password hashing algorithms.

identity_update_done

Notify that a user’s identity has been updated by the identity model.

identity_verification

Request to send a verification to the user. Return ok or an error. Handled by mod_signup to send out verification…

identity_verified

Notify that a user’s identity has been verified. Signals to modules handling identities to mark this identity as…

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

language_detect

Try to detect the language of a translation. Set is_editable_only to false to detect any language, even if the language…

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 a recipient-id or a recipient props.

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. The HTML data can not contain any Javascript, as it might be…

media_viewer_consent

Optionally wrap HTML with external content so that it adheres to the cookie/privacy settings of the current site…

menu_rsc

Fetch the menu id belonging to a certain resource

menu_save

Save the menu tree of a menu resource

middleware

Delegates the request processing.

module_activate

A module has been activated and started.