Text

All Text

sub_year

See also

sub_week

See also

sub_month

See also

sub_day

See also

ne_day

See also

in_past

See also

in_future

See also

eq_day

See also

datediff

See also

date_range

See also

add_year

Adds a year 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_month

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

add_day

See also

Dates

add_hour add_day add_month add_week add_year date date_range datediff eq_day in_future in_past ne_day sub_hour sub_day…

summary

Extract a summary from a resource.

mod_admin_merge

Adds functonality to merge two pages together into a single page.

dispatch

Dispatch rules Name Path Resource Args admin_merge_rsc [“admin”,”merge”,id] controller_admin_edit [{template

confirm

See also

alert

See also

Notifications

alert confirm growl

zmedia_choose

Used after a media item is selected in the media chooser for the TinyMCE editor.

Port configurations

Port configurations can be tricky, especially in combination with SSL. Here we explain all steps to come to a correctly…

Useful environment variables

The following environment variables influence how Zotonic starts up.

mod_l10n

Localization of Zotonic. Provides lookups for country, month, week names.

dispatch

Dispatch rules Name Path Resource Args admin_l10n [“admin”,”localization”] controller_admin [{template,”admin_l10n.

editor_remove

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

mod_clamav

Uses clamd to scan all uploaded files for viruses.

mod_admin_modules

Adds support in the admin for activating and deactivating modules.

module_toggle

Activate/deactivate a module in the module manager in the admin interface.

observe_acl_user_groups/2

Return the groups for the current user.

acl_mqtt

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

observe_acl_logon/2

Initialize context with the access policy for the user.

observe_acl_is_owner/2

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

observe_acl_is_allowed_prop/2

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

observe_acl_is_allowed/2

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

ACL notifications

acl_context_authenticated acl_is_allowed acl_is_allowed_prop acl_is_owner acl_logoff acl_logon acl_mqtt acl_user_groups…

observe_admin_menu/3

Used for fetching the menu in the admin.

mod_mailinglist

This module implements a mailing list system. You can make as many mailing lists as you like and send any page to any…

controller_admin_mailing_preview

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

observe_media_upload_props/3

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

0.06.0

Released on 2011-02-12.

escape

See also

escape_ical

See also

temporary_rsc

Creates a temporary resource if its input value is not defined.

mod_development

Presents various tools for development.

development

Not yet documented.

Upgrade notes

These notes list the most important changes between Zotonic versions. Please read these notes carefully when upgrading…

Global configuration

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

0.09.2

Released on 2013-07-02 20:53 by arjan.

observe_user_is_enabled/2

Check if a user is enabled. Enabled users are allowed to log in. Return true , false or undefined . If undefined is…

observe_signup_url/2

Handle a signup of a user, return the follow on page for after the signup. Return {ok, Url} ‘props’ is a map with…

observe_signup_failed_url/2

Signup failed, give the error page URL. Return \{ok, Url\} or undefined. Reason is returned by the signup handler for…

observe_signup_done/2

Signal that a user has been signed up (map, result is ignored)

observe_signup_confirm_redirect/2

Fetch the page a user is redirected to after signing up with a confirmed identity

observe_signup_confirm/2

Signal that a user has been confirmed. (map, result is ignored)

observe_signup_check/3

signup_check Check if the signup can be handled, a fold over all modules. Fold argument/result is \{ok, Props

observe_signup/2

Request a signup of a new or existing user. Arguments are similar to #signup_url\{\} Returns \{ok, UserId\} or \{error

observe_session_context/3

Refresh the context or request process for the given request or action

observe_request_context/3

Refresh the context or request process for the given request or action

observe_set_user_language/2

Set the language of the context to a user’s prefered language

observe_logon_submit/2

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

observe_logon_ready_page/2

Check where to go after a user logs on.

observe_identity_verified/2

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

observe_identity_verification/2

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

observe_identity_password_match/2

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

User notifications

identity_password_match identity_verification identity_verified identity_update_done logon_options logon_ready_page…

mod_admin_identity

Provides identity management in the admin - for example the storage of usernames and passwords.

0.42.0

Welcome to Zotonic 0.42.0, released on 5 November, 2018.

Customizing the style of an admin page

How to make style customizations to admin pages.

Just enough Erlang/OTP and rebar, part 1

Zotonic source code have you scratching your head? Learn Rebar first.

Just enough Erlang/OTP and rebar, part 2

Building a gen_server to front the library and generating documentation.

observe_export_resource_content_type/2

mod_export - Determine the mime type for the export.

lower

See also

capfirst

See also

upper

See also

animate

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

Debugging db (query) issues

Techniques for finding root cause when queries are involved.

postback_event

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

observe_mailinglist_mailing/2

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

Forms and validation

You should validate all input data entered in forms. In Zotonic you create forms by writing plain HTML. You can attach…

custom

See also

growl

See also

Enabling Growl Notifications

Using growl outside admin requires some magic to make it work.

remove

See also

mod_import_csv

Module which adds “import CSV” button to the admin status screen.

dispatch

Dispatch rules Name Path Resource Args admin_import [“admin”,”import”] controller_admin [{template,”_admin_import.

dialog_duplicate_rsc

Open a dialog to duplicate the current resource with a new id and title.

Docker

We offer the Docker image zotonic/zotonic-dev which contains build tools and Erlang.

mod_translation

This module provides support for dealing with multiple languages.

Translation

Many sites need to support content and templates in multiple languages. Luckily, Zotonic is completely multilingual

unlink

See also

link

See also

observe_acl_logoff/2

Clear the associated access policy for the context.

0.41.0

Welcome to Zotonic 0.41.0, released on 1 October, 2018.