Documentation
Understand the primary data-store of Zotonic.
Just Enough Regular Expressions (in Erlang)
Learn how to manipulate string data with the re module.
Return the language the resource (or translated text) will be displayed in.
Notify that the session’s language has been changed
Return rtl or ltr depening on the direction of the language.
Sort a list of language codes or map with languages on their name. Return a list of {Code, LanguageProps} pairs.
Returns the last character or element.
Custom tag which adds a ‘loader’ image to the page and performs a one-time action when loader comes into view.
Check the length of a text input.
Returns the length of the value.
Combine css and javascript includes in a single request.
Translate ASCII newlines ( \n ) into HTML <br /> elements.
Add an edge between two resources. Used in the admin.
after before chunk exclude filter first flatten_value group_by index_of is_list join last length make_list member…
Live updating templates connected to MQTT topics.
Justifies the value in a field of a certain width to the left, with spaces.
Loads the given custom tags for use in the templates. Normally not needed, as custom tags are automatically loaded…
Escapes and formats a Javascript string with a stack trace to readable HTML.
Zotonic uses Logger for logging. Logger metadata is automatically set by Zotonic in the controller functions.
Logstash is often used for log centralization and analysis. This cookbook describes how to set up Zotonic for logging…
This action logs off the current user and reloads the current page as the anonymous visitor.
Check for logon options, called if logon_submit returns undefined . This is used to fetch external (or local…
Check where to go after a user logs on.
Handle a user logon. The posted query args are included. Return:: {ok, UserId} or {error, Reason}
Inserts a piece of “lorem ipsum” text into the page.
Translates the value to lower case.
The m_acl model gives access the id of the currently logged in user, and provides a mechanism to do basic access…
Not yet documented.
Not yet documented.
This model exposes some meta-information for the use in mod_admin templates.
Not yet documented.
Not yet documented.
Not yet documented.
This model holds the admin menu, which is built up by calling each module to add items to the menu.
Add an editorial note to any resource.
Not yet documented.
inject_recipientdetails
dialog_mail_page dialog_mailing_page mailing_page_test mailinglist_confirm mailinglist_unsubscribe
Confirm a mailinglist subscription. Required argument is the confirm_key .
Send a page to a mailinglist (notify) Use {single_test_address, Email} when sending to a specific e-mail address.
Send a welcome or goodbye message to the given recipient. The recipient is either an e-mail address or a resource id.
mailinglist_recipient_key_decode
Used on the mailing list subscriptions page where users and recipients can unsubscribe from mailinglists.
Show the mailinglist subscription form to subscribe to a certain mailinglist id.
Cancel a mailing list subscription. The recipient id is given with the id argument.
Post a message to the test mailing list, given with the id argument.
Forces the value to a list.
Managing redirection after login and signup
Configure mod_signup to redirect to something other than a member’s home page.
Places a mask over an element, useful for blocking user interaction during lengthy postbacks.
Sets the progress bar of a mask.
Match a value with a regular expression.
Not yet documented.
Not yet documented.
Take the maximum of the filter value and its first argument.
Not yet documented.
Not yet documented.
This model can retrieve information about the resource category hierarchy in different ways.
Model to access the localStorage on the client (browser).
Model to access the sessionStorage on the client (browser).
Accesses comments on a page.
Zotonic has two places where a site’s configuration is kept:
Site configuration parameter was changed
Site configuration parameter was changed
Not yet documented.
Not yet documented.
Translates a string to a md5 hex value.
Not yet documented.
Access information about page connections.
Resources can have media resources attached to them. Resources and their media (images, video and audio) are connected…
Show embed, video or audio media.
Use Media classes to define image properties.
Try to find a filename extension for a mime type (example: “.jpg”)
Try to identify a file, returning a map with file properties.
Notification to translate or map a file after upload, before insertion into the database Used in mod_video to queue…
Notification to import a medium record from external source. This is called for non-file medium records, for example…
Notification to translate or map a file after upload, before insertion into the database Used in mod_video to queue…
media_identify_extension media_identify_file media_import media_import_medium media_preview_options media_import_props…
Modify the options for an image preview url or tag. This is called for every image url generation, except if the…
Notification that a medium file has been changed (notify) The id is the resource id, medium contains the medium’s…
See if there is a ‘still’ image preview of a media item. (eg posterframe of a movie) Return:: {ok, ResourceId} or…
Media update done notification. action is ‘insert’, ‘update’ or ‘delete’
Notification to translate or map a file after upload, before insertion into the database Used in mod_video to queue…
Notification that a medium file has been uploaded. This is the moment to change properties, modify the file etc. The…
Notification that a medium file has been uploaded. This is the moment to change resource properties, modify the file…
Request to generate a HTML media viewer for a resource
Optionally wrap HTML with external content so that it adheres to the cookie/privacy settings of the current site…
Not yet documented.
DomainKeys Identified Mail Signatures (RFC 6376) is a method to add a signature to outgoing emails. This enables…
Not yet documented.
Tracks the send/bounce/error status of all outgoing emails.
Finds a value in a list.
menu_flat menu_is_visible menu_expand menu_rsc menu_subtree menu_trail
Show a page menu.
Takes a menu, or a menu resource id, and adds all haspart objects connected to the menu ids.
Flattens the rsc menu structure for use in a template loop.
Filters a list of menu items on visibility and existance. Only top-level menu items that are both visible and exist are…
Fetch the menu id belonging to a certain resource
Save the menu tree of a menu resource
Get the subtree of an id in a menu (if any).