Text

All Text

dialog_new_rsc

Show the admin dialog for creating a new resource.

slugify

Converts a text into a slug.

dispatch

Dispatch rules Name Path Resource Args admin_seo [“admin”,”seo”] controller_admin_seo [seo_noindex]…

mod_oauth2

OAuth2 provider module for app/client/token management and authorization flows.

is_letsencrypt_valid_hostname

Test if a hostname can be used for a Let’s Encrypt certificate.

observe_survey_submit/2

A survey has been filled in and submitted.

validation_error

Render a validation error on the target. Text is given in the text argument.

mailinglist

Model for mailinglist operations and reporting, including recipient counts, delivery stats, subscriptions, and…

replace_args

Replace $N placeholders in string from a list of replacement values.

dispatch_module_admin

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

observe_postback_notify/2

Handle a javascript notification from the postback handler. The message is the the request, trigger the id of the…

mod_admin_frontend

Adds editing of resources, menu-trees and collections for non-admin users.

dispatch

Dispatch rules Name Path Resource Args admin_frontend_edit [“edit”] controller_page [{acl,is_auth},{template

slice

Perform array-slice operations on a list or string.

CMS

Zotonic is a Content Management System (CMS).

dispatch

Dispatch rules Name Path Resource Args admin_auth2fa_config [“admin”,”authentication-2fa”] controller_admin [{ssl

observe_dispatch_host/2

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

observe_email_failed/2

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

with_args

Apply actions with arguments added.

Actions

with_args

set_value

Set the value of a form field.

mod_cron

Provides periodic tick notifications and module-defined cron job scheduling.

yesno

Show a boolean value as a text.

slide_toggle

Toggle an element by sliding it up and down.

observe_sanitize_embed_url/2

Sanitize an embed url. The hostpart is of the format: <<"youtube.com/v..."\>\> .

Resource lists

group_firstchar group_title_firstchar is_a is_not_a is_visible media_for_language

observe_media_identify_extension/2

Try to find a filename extension for a mime type (example: <<".jpg"\>\> )

reversed

Reverse a list.

admin_status

Model for admin status endpoints, including Zotonic version and health/status overview values.

observe_rsc_get/3

Resource is read, opportunity to add computed fields Used in a foldr with the read properties as accumulator.

script

This action executes JavaScript directly. It can be used to interface with non-Zotonic JavaScript libraries and…

observe_output_html/3

Fold for mapping non-iolist output to iolist values.

observe_rsc_insert/3

Foldr for a resource insert, these are the initial properties and will overrule the properties in the insert request.

acl

The m_acl model gives access the id of the currently logged in user, and provides a mechanism to do basic access…

mailinglist_unsubscribe

Cancel a mailing list subscription. The recipient id is given with the id argument.

mailing_page_test

Post a message to the test mailing list, given with the id argument.

dialog_mailing_page

Shows the dialog to mail the current page ( resource) to a mailing list. This is used in the admin “mailing status”…

dialog_mail_page

Shows the dialog to mail the current page ( resource) to a single e-mail address. This is used in the frontend of a…

Mailing list

dialog_mail_page dialog_mailing_page mailing_page_test mailinglist_confirm mailinglist_unsubscribe

mod_contact

Implements a basic contact form, which gets emailed to the configuration value mod_contact.email , when submitted.

Proxying Zotonic with nginx

It is possible to put Zotonic behind the nginx <http://nginx.org/> web server, for example if you have other, non

Running on Port 80 and Port 443

Using standard ports helps visitors discover your page and removes the awkward port number from URLs.

acl_user_group

Model for ACL user-group helper values in mod_acl_user_groups, including collaboration-group settings and category…

delete_rsc

Delete a resource, without confirmation.

observe_export_resource_header/2

mod_export - Fetch the header for the export.

observe_export_resource_footer/2

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

observe_export_resource_filename/2

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

observe_export_resource_encode/2

mod_export - Encode a single data element.

observe_export_resource_data/2

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

observe_export_resource_content_disposition/2

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

observe_import_resource/2

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

observe_import_csv_definition/2

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

Import/export notifications

import_csv_definition import_resource export_resource_content_disposition export_resource_content_type…

mod_custom_redirect

Enables redirects from unknown hosts and paths to other locations. The other location can be a known path or another…

custom_redirect

Model for custom redirect records, exposing redirect list and individual redirect lookup by id.

l10n

Model for localization helpers, including countries, country names, available timezones, and site timezone settings.

admin_config

Model for admin configuration views, including SSL certificate info, security directory info, and selected module…

mod_geoip

Used to map IP addresses to geographical locations.

ip2country

Maps an IP address to a country using the MaxMind GeoIP2 database.

center

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

rjust

Justifies the value in a field of a certain width to the right, using spaces.

ljust

Justifies the value in a field of a certain width to the left, with spaces.

site

Retrieve information that is stored in the site configuration. If you want to query values from the config table…

mod_zotonic_site_management

Site management module for creating, configuring, and controlling managed Zotonic sites.

last

Returns the last character or element.

observe_comment_insert/2

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

focus

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

observe_admin_edit_blocks/3

Used in the admin to fetch the possible blocks for display

nthtail

Fetch the nth tail of a list.

first

Returns the first character or element.

tokens

Returns a list of tokens from input string, separated by the characters in the filter argument.

mod_admin_config

Add support for editing the site’s configuration values, as accessed through m_config.

observe_url_abs/2

Make a generated URL absolute, optionally called after url_rewrite by z_dispatcher

observe_media_import/2

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

mod_editor_tinymce

Adds wysiwyg tinyMCE editors to the admin.

HTTPS support

Zotonic has built-in support for HTTPS and TLS (previously SSL) certificate handling.

mod_ssl_letsencrypt

Request certificates from Let’s Encrypt.

mod_ssl_ca

The mod_ssl_ca module adds support for using SSL certificates bought from a Certificate Authority.

mod_acl_user_groups

This module adds rule-based access control.

presence

Check if an input has been filled in or checked.

postback

Performs a custom server side validation of an input value. This allows you to add your own validation logic to HTML…

numericality

Numerical input and range check.

name_unique

A validator to check whether a resource’s name is unique:

format

Regular expression test.

email

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

date

Validate input date against a given date format.

confirmation

Check if two inputs are the same.

acceptance

Check if an input value evaluates to true.

mod_comment

Implements a basic commenting system, enabling commenting on resources.

format_integer

Show an integer value.

format_number

Show an integer or float.

format_price

Show a price with decimals.

observe_media_update_done/2

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

mod_oembed

Makes media resources from embeddable URLs through the OEmbed protocol.

mailinglist_confirm

Confirm a mailinglist subscription. Required argument is the confirm_key .

observe_media_viewer/2

Request to generate a HTML media viewer for a resource. The HTML data can not contain any Javascript, as it might be…

mod_ratelimit

Implements rate limiting for various resources.

observe_auth_reset/2

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