Text
Implement a custom search by observing the search_query notification in your module. Imagine you want to search cookies…
Custom tags, internally called scomps , are module-defined tags, which are used when the logic is too complex to be…
In this chapter we will look at how to implement a model around the The Open Movie Database (OMDB) API.
Create custom template filters to change the way variables are rendered in your templates. By following some simple…
Admin cookbook Creating a custom widget on the edit page Customizing the layout of the admin edit page Customizing the…
Trigger various jQuery effects on the target element. Mostly, each of these effects have their own action as a shortcut
Not yet documented.
Removes all HTML tags from the value.
Handle different content representations of a page.
Filters a list on the value of a property, either on presence or equality.
is_not_a mirrors is_a. It is particularly useful when iterating over a category and excluding members of a sub-category…
Filter a list of resource ids on category, or test if a single resource id belongs to a category.
Filter a list of resource ids so that only the visible ids remain.
Pretty print a zotonic value in a template.
Welcome to Zotonic 0.37.0, released on 5 March, 2018.
Regular expression replacement of a pattern with a string.
Match a value with a regular expression.
match replace
Redirect to the controller controller_file.
Serve an uploaded-, resized- or library file.
Welcome to Zotonic 0.57.0, released on May 11, 2020.
Some interesting tidbits about saving/updating a date/time field of a resource.
Any Zotonic system is capable of sending and receiving e-mail messages over SMTP.
Force the given value in the given range.
Take the minimum of the filter value and its first argument.
Take the maximum of the filter value and its first argument.
Fetch the url of a resource’s html representation
The zotonic command runs a number of utility commands which all operate on a Zotonic instance.
It is possible to create end-to-end integration tests for Zotonic websites. Tests like these are called sitetests .
Test if a value is a number (integer or floating point):
Get quicker access to Zotonic code on the shell.
The main admin edit controller. This controller serves the edit page where resources can be edited.
controller_admin_media_preview
A controller for rendering preview thumbnails of any media embedded in a richtext-editor component of a resource on the…
Dispatch rules route incoming requests to controllers.
Controllers are the Erlang modules which decide what happens when a browser requests a page. Zotonic looks at the…
Wires are the older way to code actions and client/server interaction. It is now advised to use MQTT topics with…
Applying Erlang Binary syntax to get fast character manipulation.
Show a template.
Access control is about defining who is allowed to access certain resources. It takes two steps:
Adds basic search engine optimization to the base templates and provides an admin interface for configuring SEO options…
Show a rsc as a HTML page.
Try to identify a file, returning a map with file properties.
Sets the “disabled” attribute of a HTML tag and adds the CSS class “disabled”.
Resets the “disabled” attribute of a HTML tag and removes the CSS class “disabled”.
Zotonic runs on Linux, Mac OS X and (not officially) on Windows.
Installation Zotonic won’t start and shows errors when running zotonic debug Check your site’s database configuration.
The Zotonic “status” site is the first thing you see once you have installed Zotonic, or if you do not have any sites…
Zotonic has the capability of serving more than one site at a time. You can have multiple sites enabled, each with its…
You have three options for running Zotonic: to get started quickly, start our Zotonic container. You can also use Nix…
Toggle a CSS class from an HTML element.
Add a css class to an html element.
Remove a CSS class from an HTML element.
Not yet documented.
mod_backup serves two different purposes: it makes a nightly backup of your files and database, and can also backup…
Email status notification, sent when the validity of an email recipient changes
Foldr to change or add pivot fields for the main pivot table. The rsc contains all rsc properties for this resource
Hide an element by animating the height and opacity.
Show an element by animating the height and opacity.
Hide an element by animating the height.
Show an element by animating the height.
Hide an element by animating the opacity.
Hide an element without any animation.
Show an element without any animation.
Toggle the visibility of an element.
Show an element by animating the opacity.
Translates a datetime from local time to UTC.
Show a readable version of a date/time difference.
Subtracts a year from a date. The value must be of the form {{Y,M,D},{H,I,S}} .
Subtracts a week from a date. The value must be of the form {{Y,M,D},{H,I,S}} .
Subtracts a month from a date. The value must be of the form {{Y,M,D},{H,I,S}} .
Subtracts a day from a date. The value must be of the form {{Y,M,D},{H,I,S}} .
Tests if two dates are not equal.
Tests if a date is in the past.
Tests if a date is in the future.
Tests if the value is a date and equal to the argument. The value and the argument must be a tuple of the format {Y,M
Calculate the difference between two dates, returning a single part of that difference.
Show a date range.
Adds a year to a date. The value must be of the form {{Y,M,D},{H,I,S}} .
Adds a week to a date. The value must be of the form {{Y,M,D},{H,I,S}} .
Adds a month to a date. The value must be of the form {{Y,M,D},{H,I,S}} .
Adds a day to a date. The value must be of the form {{Y,M,D},{H,I,S}} .
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…
Extract a summary from a resource.
Adds functonality to merge two pages together into a single page.
Dispatch rules Name Path Resource Args admin_merge_rsc [“admin”,”merge”,id] controller_admin_edit [{template
Show a JavaScript confirm message and on confirmation triggers one or more actions and/or sends a postback to the…
Show an alert dialog.
alert confirm growl
Used after a media item is selected in the media chooser for the TinyMCE editor.
Port configurations can be tricky, especially in combination with SSL. Here we explain all steps to come to a correctly…
The following environment variables influence how Zotonic starts up.
Localization of Zotonic. Provides lookups for country, month, week names.
Dispatch rules Name Path Resource Args admin_l10n [“admin”,”localization”] controller_admin [{template,”admin_l10n.
Remove any WYSIWYG editor controls from all textarea’s with the z_editor class in the target.
Uses clamd to scan all uploaded files for viruses.
Adds support in the admin for activating and deactivating modules.
Activate/deactivate a module in the module manager in the admin interface.
Return the groups for the current user.