Documentation
Tests if a value is undefined.
Todo
Filter a list of resource ids so that only the visible ids remain.
script
Adds javascript that will be run after jQuery has been initialized. In dynamic content it will run after the DOM has…
Joins the elements of a list. Joins the elements of the input list together, separated by the argument.
Trigger various jQuery effects on the target element. Mostly, each of these effects have their own action as a shortcut
Todo
These Cookbook items each represent a stage in some Zotonic users’ journeys to understand the workings of Erlang and…
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.
An indispensible tool for both learning and programming Erlang.
Understand the primary data-store of Zotonic.
Just Enough Regular Expressions (in Erlang)
Learn how to manipulate string data with the re module.
Model for localization helpers, including countries, country names, available timezones, and site timezone settings.
Return the language the resource (or translated text) will be displayed in.
Return rtl or ltr depening on the direction of the language.
Sort a list of language codes or map with languages on their sort key. Return a list of {Code, LanguageProps} pairs.
Sort a list of language codes or map with languages on their localized name in the currently selected language. This is…
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.
See also
Translate ASCII newlines ( \n ) into HTML <br /\> elements.
Add an edge between two resources. Used in the admin.
Model for LinkedIn integration helpers, currently exposing whether LinkedIn auth integration is enabled.
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.
See also
Model for runtime logging state and access to server log entries for clients allowed to read logs.
Model for email log lookups used by logging/admin views.
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.
Model for admin UI log retrieval by index, gated by admin permissions.
Inserts a piece of “lorem ipsum” text into the page.
Translates the value to lower case.
inject_recipientdetails mailinglist_recipient_key_decode
dialog_mail_page dialog_mailing_page mailing_page_test mailinglist_confirm mailinglist_unsubscribe
Model for mailinglist operations and reporting, including recipient counts, delivery stats, subscriptions, and…
Confirm a mailinglist subscription. Required argument is the confirm_key .
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.
Todo
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.
Take the maximum of the filter value and its first argument.
Translates a string to a md5 hex value.
Access to data about uploaded files and other media.
See also
Resources can have media resources attached to them. Resources and their media (images, video and audio) are connected…
Use Media classes to define image properties.
Filter a list of media items by their medium_language property, return the best matching with the current or given…
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…
Finds a value in a list.
menu_flat menu_ids 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.
Returns all resource ids in a menu. Could return invisible and non existing resource ids. The returned ids are a flat…
Filters a list of menu items on visibility and existance. Only top-level menu items that are both visible and exist are…
Return the menu to be displayed with a resource.
Get the subtree of an id in a menu (if any).
Return a breadcrumb navigation trail for the given id.
A mail-merge like filter where tag-expressions in a text are replaced with the value of their evaluation.
Check with useauth if the authentication using the Microsoft identity platform is enabled and configured.
Take the minimum of the filter value and its first argument.
Force the given value in the given range.
gravatar_code ip2country ip2geo is_letsencrypt_valid_hostname format_dispatch_controller_option…
Mocking module for access control during tests.
This module adds rule-based access control.
Admin backend module that wires the core admin interface, assets, and admin-specific event handling.
Note
Add support for editing the site’s configuration values, as accessed through m_config.
Adds editing of resources, menu-trees and collections for non-admin users.
Provides identity management in the admin - for example the storage of usernames and passwords.
Adds functonality to merge two pages together into a single page.
Adds support in the admin for activating and deactivating modules.
Add support for editing predicates in the admin, by presenting a list of all defined predicates on http://yoursite.com…
Admin module exposing site statistics views and related dashboard metrics.
This module contains many useful icons and images.
Adds support for viewing and handling audio medium items.
Two-factor authentication module adding TOTP setup, verification flows, and related auth checks.
This module contains the main Zotonic authentication mechanism. It contains the logon and logoff controllers, and…
mod_backup serves two different purposes: it makes a nightly backup of your files and database, and can also backup…
mod_base is the base module, which acts as a container module holding most of Zotonic basic dispatch rules, Actions and…
Adds support for the Twitter Bootstrap CSS / JavaScript framework. Integration module for Bootstrap assets and helper…
Uses clamd to scan all uploaded files for viruses.
Implements a basic commenting system, enabling commenting on resources.
Implements a basic contact form, which gets emailed to the configuration value mod_contact.email , when submitted.
Module for content group support and ACL-aware content group behavior.