Reference

All Reference

acceptance

Check if an input value evaluates to true.

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 notifications

acl_context_authenticated acl_is_allowed acl_is_allowed_prop acl_is_owner acl_logoff acl_logon acl_mqtt acl_user_groups…

ACL options

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

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…

Actions

with_args

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.

add_class

Add a css class to an html element.

add_day

Adds a day to a date. The value must be of the form {{Y,M,D},{H,I,S}} .

add_hour

Adds an hour to a date. The value must be of the form {{Y,M,D},{H,I,S}} .

add_month

Adds a month to a date. The value must be of the form {{Y,M,D},{H,I,S}} .

add_week

Adds a week to a date. The value must be of the form {{Y,M,D},{H,I,S}} .

add_year

Adds a year to a date. The value must be of the form {{Y,M,D},{H,I,S}} .

Admin

admin_tasks redirect_incat

admin_dispatch

Dispatch rules Name Path Resource Args admin_user [“admin”,”users”] controller_admin [{template,”admin_users.tpl”}

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

admin_tasks

Action module which provides postback handlers for the “status” view of the admin:

after

Return the first element after another element in a list. For example:

alert

Show an alert dialog.

all catinclude

Include a template for all a resource’s categories from all modules.

All dispatch rules

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

all include

Call all modules to include a certain template.

animate

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

append

Appends the argument to the value.

as_atom

Convert a value to an Erlang atom.

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

Authentication notifications

auth_checked auth_confirm auth_confirm_done auth_client_logon_user auth_client_switch_user auth_logon auth_logoff…

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

autoescape

Automatically apply HTML escaping to values.

backup

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

Backup

backup_start

backup_start

Action which starts a manual backup.

before

Return the first element before another element in a list. For example:

Binaries

first last length to_binary

block

Define a block in a template and overrules a block from an inherited template.

brlinebreaks

Translate HTML <br/> elements into ASCII newlines ( \n ).

button

Makes a button with an action attached.

cache

Cache a frequently used block for later reuse.

call

Call an Erlang function.

capfirst

Converts the first character of the value to uppercase.

category_hierarchy_save

Save (and update) the complete category hierarchy

catinclude

Include another template based on the category of a resource. The include tag is replaced with the contents of the…

center

Centers the value in a field of a certain width using spaces.

Character escaping

brlinebreaks escape escape_check escape_ical escape_link escapejs escapejson escapexml fix_ampersands force_escape…

chart_pie

Show a pie chart.

chart_pie3d

Show a pie chart with 3D effect.

chunk

This filter splits a list in shorter lists. It splits an array in sub-arrays of at most a given length. This is useful…

Command-line

The zotonic command runs a number of utility commands which all operate on a Zotonic instance.

comment

Ignore part of a template.

comment_insert

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

Config

config_delete config_toggle dialog_config_delete dialog_config_edit dialog_config_new

config_delete

Trigger the deletion of a configuration value. Used in the admin.

config_toggle

Toggle a configuration value. Used in the admin, for instance when displaying a “live” checkbox the state of which…

Configuration

Global configuration Site configuration Port configurations

confirm

Show a JavaScript confirm message and on confirmation triggers one or more actions and/or sends a postback to the…

confirmation

Check if two inputs are the same.

content_types_dispatch

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

controller_admin

The admin controller is the main controller behind which admin pages are served. Its main purpose is that it does an…

controller_admin_backup

Shows the admin backup screen where you can download nightly backups that were made by mod_backup.

controller_admin_backup_revision

Shows the admin backup revisions screen where you can see older version for a resource.

controller_admin_category_sorter

Shows the admin category screen where you can edit the category tree, rearranging the categories, adding new categories

controller_admin_comments

Shows an admin screen with an overview of most recently created comments. The screen offers the option to moderate the…

controller_admin_comments_settings

Shows an admin settings screen where you can edit settings related to mod_comment.

controller_admin_config

Shows the admin config editor. Here you can edit the key/value pairs of m_config.

controller_admin_edit

The main admin edit controller. This controller serves the edit page where resources can be edited.

controller_admin_mailinglist

This controller shows the mailing lists that are available in the system.

controller_admin_mailinglist_recipients

Shows the recipients of the current mailing list. The recipients are listed in three columns, and have a checkbox next…

controller_admin_mailing_preview

This controller shows a preview of what a resource that is being mailed would look like, in a popup window.

controller_admin_mailing_status

This controller shows the mailing status of a resource. It lists each mailing list available in the system, and shows…

controller_admin_media_preview

A controller for rendering preview thumbnails of any media embedded in a richtext-editor component of a resource on the…