Documentation
Escapes the value for safe insertion into JSON strings.
Convert any URLs in a plaintext into HTML links, with adding the rel="nofollow" attribute, and replaces all newlines…
Escape the value for insertion in xml output.
Bind actions to a jQuery event or submit a form.
postback trigger_event publish
Filters a list on the value of a property, either on absence or inequality.
Execute tasks asynchronously using the task queue
The Zotonic task queue lets applications perform tasks asynchronously.
Zotonic comes with a system for collecting and exporting metrics (such as how much memory is used, how many database…
See also
Extract a specific property from each item in a list.
Model for Facebook integration helpers, including auth-use flag, profile picture fetch, and Graph API proxy calls.
Show an element by animating the opacity.
Hide an element by animating the opacity.
This filter formats a numeric value as KB, MB etc. This filter can be used to display a number of bytes in a human…
The filestore uses two tables for its administration.
Model to start uploads, upload a block and delete uploads.
Filters a list on the value of a property, either on presence or equality.
Filter the contents of a block through variable filters.
Applying Erlang Binary syntax to get fast character manipulation.
Filter a list of items based on a property value and optional predicate.
Returns the first character or element.
Not implemented, but exists in Zotonic for forward compatibility with future ErlyDTL and Django versions.
Replaces ampersands in the value with “&” entities.
Flatten a list to a comma separated string.
Round down a floating point value.
Add a $(..).focus() jQuery call to the target element to give it input focus.
Loop over multiple values in a list or search result.
HTML escapes a text.
Regular expression test.
format_dispatch_controller_option
Format dispatch controller options.
Format dispatch path element so variables will be more visible.
Show a duration in hours, minutes and seconds.
Show an integer value.
Show an integer or float.
Show a price with decimals.
Resets the target form to its initial state.
disable enable event focus form_reset reset set_value submit typeselect validation_error
pickle
You should validate all input data entered in forms. In Zotonic you create forms by writing plain HTML. You can attach…
Parse a string as a JSON (JavaScript Object Notation) value. The returned value can be processed futher.
These cookbook entries contain valuable nuggets of information regarding the frontend development of a site.
You have three options for running Zotonic: to get started quickly, start our Zotonic container. You can also use Nix…
This section describes the location and contents of Zotonic’s global configuration files erlang.config and zotonic.
These variables are always available for rendering in templates.
Action An action is functionality that can be attached to a HTML element or event. Actions are wired to an element or…
Make charts with Google.
Calculate the gravatar code for an e-mail address:
Groups items of a list by a property.
Group a list of sorted resource ids on their first letter of the title or another rsc property. After grouping, it…
Similar to group_firstchar, but always uses the title column from the rsc table.
Show a message in the upper right corner of the browser window. The message will automatically disappear after some…
A validator to check if a resource has a certain number of edges with a predicate.
Hide an element without any animation.
The category hierarchy tables have been replaced by m_hierarchy . This model defines named hierarchies of resources…
How to add a custom page block
Zotonic comes with a number of standard page blocks: Header, Text and Embed page. Additional page blocks are provided…
Specific error pages Zotonic’s controller_http_error first tries to find an error page template that is specific for…
show_media striptags truncate_html sanitize_html sanitize_url urlize embedded_media without_embedded_media render…
Zotonic has built-in support for HTTPS and TLS (previously SSL) certificate handling.
Including Zotonic icons CSS Add the CSS file to your template:
Zotonic provides a couple of ways to show icons in templates:
The m_identity model manages usernames and other user identities. mod_authentication uses it to store and check salted…
Selects an argument depending on a condition.
See also
Not implemented, but exists in Zotonic for forward compatibility with future ErlyDTL and Django versions.
See also
See also
Tests whether a value is undefined, returning the given argument.
See also
See also
Manages the medium_edit_settings property for non destructive image editing.
See also
Implementing a simple contact form
This tutorial teaches you to create a form, validate it, submit it over Ajax and e-mail the results back to you.
Model to track resources imported from CSV and XLSX files.
import_csv_definition import_resource export_resource_content_disposition export_resource_content_type…
See also
Returns the index of the first occurrence of the item in the given list.
Tests if a date is in the future.
See also
Adds recipient query string details to hyperlinks.
Tests if a date is in the past.
Render a JS-aided inplace textbox.
Prepends the argument in front of the value.
Insert the result of a render action after of an HTML element.
Insert the result of a render action before an HTML element.
Inserts HTML after the contents of an HTML element.
Inserts HTML before the contents of an HTML element.
Zotonic runs on Linux, Mac OS X and (not officially) on Windows.
This is the Zotonic Developer Guide. It takes you through all aspects of Zotonic so you can start building your own…
Maps an IP address to a country using the MaxMind GeoIP2 database.
Maps an IP address to information about that country.
Filter a list of resource ids on category, or test if a single resource id belongs to a category.
Tests if a value is defined.
Test if an integer value is even:
Test if a hostname can be used for a Let’s Encrypt certificate.
Test if a value is a list:
is_not_a mirrors is_a. It is particularly useful when iterating over a category and excluding members of a sub-category…
Test if a value is a number (integer or floating point):
Check if the given language is a rtl or ltr language.
Test if the given URL is a url for the current site.
If you encounter any issues in using Zotonic, or have ideas for new features, please let us know at the Zotonic issue…