Documentation
Browse by topic
Explore related documentation through its most useful keyword groups.
1031 items
Grouped by Architecture
A named transformation applied to a value inside a template expression.
Explore this clusterA typed event or request exchanged between decoupled Zotonic components through the notifier.
Explore this clusterA server-defined browser action or event binding connected through Zotonic wires.
Explore this clusterAn OTP application or site component that adds Zotonic behavior templates data and configuration.
Explore this clusterA namespaced interface for retrieving or changing data from Erlang templates MQTT or APIs.
Explore this clusterA server-side template_compiler document that renders data into HTML text email or another representation.
Explore this clusterA request handler that maps web requests to responses and coordinates authorization rendering or data transfer.
Explore this clusterA route declaration that matches a URL pattern and selects a controller with arguments.
Explore this clusterThe central Zotonic entity that represents content users media categories and other addressable objects.
Explore this clusterDocumentation not covered by the other keyword groups in this split.
Explore this clusterThis section describes the location and contents of Zotonic’s global configuration files erlang.config and zotonic.config . There’s also site-specific…
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 event. Think of showing dialogs, posting…
Calculate the gravatar code for an e-mail address:
Groups items of a list by a property.
Group a list of sorted model#rsc resource IDs on their first letter of the title or another resource property. After grouping, it splits this list in a number…
Similar to filter#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 time.
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 (pages).
Zotonic comes with a number of standard page blocks: Header, Text and Embed page. Additional page blocks are provided by modules, for example mod_survey uses…
Specific error pages Zotonic’s controller_http_error first tries to find an error page template that is specific for the HTTP status code, named templates…
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. module#mod_authentication uses it to store and check salted passwords, but also provides a…
Selects an argument depending on a condition.
Show something if the condition is true.
Not implemented, but exists in Zotonic for forward compatibility with future ErlyDTL and Django versions.
Show something if two values are equal.
Show something if two values are not equal.
Tests whether a value is undefined, returning the given argument.
Show a still image using an <img\> element. The image will be automatically resized to the desired size and filters. For video, use the tag#media tag instead.
Generate a data: url of a still image.
Manages the medium_edit_settings property for non destructive image editing.
Generate the url of a still image.
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.
Include another template. The include tag is replaced with the contents of the included template file. You can give arguments to the included template, they…
Returns the index of the first occurrence of the item in the given list.
Tests if a date is in the future.
Include the markup of an extended template into the extending template.
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 rendered HTML immediately after the target 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 sites as quickly as possible.
Return the lowercase ISO country code associated with an IP address.
Return geographic information associated with an IP address.
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 filter#is_a. It is particularly useful when iterating over a category and excluding members of a sub-category (iterating over all images…
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 tracker. You need to have a free GitHub…
Tests if a value is undefined.
Test if a resource is a user.
Test whether a value has valid email-address syntax.
Filter a list of resource ids so that only the visible ids remain.
Adds javascript that will be run after jQuery has been initialized. In dynamic content it will run after the DOM has been updated with the template where the…
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, for example action#show, action#hide.
Validate that a form value is JSON.
Zotonic source code have you scratching your head? Learn Rebar first.
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.
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 useful for editorial interfaces where…
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.
Model for LinkedIn integration helpers, currently exposing whether LinkedIn auth integration is enabled.
Live-updating templates driven by 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 through the module system.
Model for runtime logging state and access to server log entries for clients allowed to read logs.
Model for admin Content-Security Report log retrieval by index, gated by admin permissions.
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 to Logstash over UDP. As mentioned in the…
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.
Model for mailinglist operations and reporting, including recipient counts, delivery stats, subscriptions, and scheduled mailings.
Confirm a mailinglist subscription. Required argument is the confirm_key .
Used on the mailing list subscriptions page where users and recipients can unsubscribe from mailinglists.
Durable mailing runs and delivery accounting, available as m.mailinglist_run in templates. Recipient addresses and message diagnostics are never published on…
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.