Reference

All Reference

dispatch

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

dispatch

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

dispatch-cotonic

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

dispatch_export

Dispatch rules Name Path Resource Args export_rsc [“export”,”rsc”] controller_export_resource [] export_rsc…

dispatch_host

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

dispatch_mailinglist

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

dispatch_module_admin

Dispatch rules Name Path Resource Args admin_modules [“admin”,”modules”] controller_admin_module_manager…

Dispatch notifications

content_types_dispatch dispatch dispatch_host dispatch_rewrite page_url url_abs url_rewrite

dispatch_rewrite

Rewrite a URL before it will be dispatched using the z_sites_dispatcher

dispatch-test

Dispatch rules Name Path Resource Args initial_test [“test”,”initial_postback_test”] controller_template…

dispatch_translation

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

DOM Elements

add_class animate buttonize effect fade_in fade_out hide insert_after insert_before insert_bottom insert_top…

draggable

Mark a html element as draggable.

dropbox_file

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

droppable

Mark an element as valid drag destination.

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 notifications

edge_delete edge_insert edge_update

edge_update

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

Editor

editor_add editor_remove zlink zmedia zmedia_choose zmedia_has_chosen

editor_add

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

editor_remove

Remove any WYSIWYG editor controls from all textarea’s with the z_editor class in the target.

effect

Add a $(..).effect jQuery call to the target element.

element

Select an element from a tuple or list of tuples.

email

Check if the content of the input field is an e-mail address.

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

E-mail notifications

email_add_handler email_bounced email_dkim_options email_drop_handler email_ensure_handler email_failed…

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

email_unique

Check if an entered e-mail address is unique, by looking in the m_identity table for the email key:

embedded_media

Fetch media ids that are embedded in the body , body_extra and text blocks of your page.

enable

Resets the “disabled” attribute of a HTML tag and removes the CSS class “disabled”.

Encryption

md5 sha1

eq_day

Tests if the value is a date and equal to the argument. The value and the argument must be a tuple of the format {Y,M

escape

HTML escape a text. Escapes all reserved HTML characters in the value. Escaped strings are safe to be displayed in a…

escape_check

Ensures thant an HTML escaped value is properly escaped.

escape_ical

Escape the value according to the RFC2445 rules.

escapejs

Escapes the value for insertion in JavaScript output.

escapejson

Escapes the value for insertion in JSON output.

escape_link

Convert any URLs in a plaintext into HTML links, with adding the rel="nofollow" attribute, and replaces all newlines…

escapexml

Escape the value for insertion in xml output.

event

Bind actions to a jQuery event or submit a form.

Events

postback trigger_event publish

exclude

Filters a list on the value of a property, either on absence or inequality.

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.

extends

Inherit markup from another template.

fade_in

Show an element by animating the opacity.

fade_out

Hide an element by animating the opacity.

filesizeformat

This filter formats a numeric value as KB, MB etc. This filter can be used to display a number of bytes in a human…

filewatcher

Broadcast some file changed, used for livereload by mod_development

filter

Filter the contents of a block through variable filters.

filter

Filters a list on the value of a property, either on presence or equality.

first

Returns the first character or element.

firstof

Not implemented, but exists in Zotonic for forward compatibility with future ErlyDTL and Django versions.

fix_ampersands

Replaces ampersands in the value with “&” entities.

flatten_value

Flatten a list to a comma separated string.

focus

Add a $(..).focus() jQuery call to the target element to give it input focus.

for

Loop over multiple values in a list or search result.

force_escape

HTML escapes a text.

format

Regular expression test.

format_dispatch_controller_option

Format dispatch controller options.

format_dispatch_path_element

Format dispatch path element so variables will be more visible.

format_duration

Show a duration in hours, minutes and seconds.

format_integer

Show an integer value.

format_number

Show an integer or float.

format_price

Show a price with decimals.

form_reset

Resets the target form to its initial state.

Forms

pickle

Forms

disable enable event focus form_reset reset set_value submit typeselect validation_error

Global configuration

This section describes the location and contents of Zotonic’s global configuration files erlang.config and zotonic.

Global template variables

These variables are always available for rendering in templates.

google_chart

Make charts with Google.

gravatar_code

Calculate the gravatar code for an e-mail address:

group_by

Groups items of a list by a property.

group_firstchar

Group a list of sorted resource ids on their first letter of the title or another rsc property. After grouping, it…

group_title_firstchar

Similar to group_firstchar, but always uses the title column from the rsc table.

growl

Show a message in the upper right corner of the browser window. The message will automatically disappear after some…

hide

Hide an element without any animation.

hierarchy_updated

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

HTML

show_media striptags truncate_html sanitize_html sanitize_url urlize embedded_media without_embedded_media…

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.

if

Show a block if the condition is true.