Documentation

All Documentation

Character escaping

brlinebreaks escape escape_check escape_ical escape_link escapejs escapejson escapexml fix_ampersands force_escape…

chart_pie

Show a pie chart.

chart_pie3d

Show a pie chart with 3D effect.

chunk

See also

client_local_storage

Model to access the localStorage on the client (browser).

client_session_storage

Model to access the sessionStorage on the client (browser).

CMS

Zotonic is a Content Management System (CMS).

Command-line

The zotonic command runs a number of utility commands which all operate on a Zotonic instance.

Command-line shell

The Zotonic shell gives you access to a running Zotonic instance with its code and data.

comment

Ignore part of a template.

comment

Accesses comments on a page.

config

Zotonic has two places where a site’s configuration is kept:

Config

config_delete config_toggle dialog_config_delete dialog_config_edit dialog_config_new

config_delete

Trigger the deletion of a configuration value. Used in the admin.

config_toggle

Toggle a configuration value. Used in the admin, for instance when displaying a “live” checkbox the state of which…

Configuration

Global configuration Site configuration Port configurations

confirm

See also

content_group

Not yet documented.

Contributing to Zotonic

We encourage contributions to Zotonic from the community! This chapter describes how you can help improve Zotonic.

controller_admin

The admin controller is the main controller behind which admin pages are served. Its main purpose is that it does an…

controller_admin_backup

Shows the admin backup screen where you can download nightly backups that were made by mod_backup.

controller_admin_backup_revision

Shows the admin backup revisions screen where you can see older version for a resource.

controller_admin_category_sorter

Shows the admin category screen where you can edit the category tree, rearranging the categories, adding new categories

controller_admin_comments

Shows an admin screen with an overview of most recently created comments. The screen offers the option to moderate the…

controller_admin_comments_settings

Shows an admin settings screen where you can edit settings related to mod_comment.

controller_admin_config

Shows the admin config editor. Here you can edit the key/value pairs of m_config.

controller_admin_edit

The main admin edit controller. This controller serves the edit page where resources can be edited.

controller_admin_mailinglist

This controller shows the mailing lists that are available in the system.

controller_admin_mailinglist_recipients

Shows the recipients of the current mailing list. The recipients are listed in three columns, and have a checkbox next…

controller_admin_mailing_preview

This controller shows a preview of what a resource that is being mailed would look like, in a popup window.

controller_admin_mailing_status

This controller shows the mailing status of a resource. It lists each mailing list available in the system, and shows…

controller_admin_media_preview

A controller for rendering preview thumbnails of any media embedded in a richtext-editor component of a resource on the…

controller_admin_module_manager

Shows the list of Zotonic modules currently known to the system.

controller_admin_referrers

Shows the list of pages ( resources) which refer to this resource through an edge.

controller_admin_seo

Shows a form with settings related to Search Engine Optimization.

controller_authentication

This controller manages all authentication cookies. It is called by the auth model in the browser.

controller_file_id

Redirect to the controller controller_file.

controller_fileuploader

The fileuploader controller is used to upload parts of a file.

controller_http_error

This controller is called for serving http error pages.

controller_id

Handle different content representations of a page.

controller_language_set

Controller which sets the language as given in the code argument, and redirects the user back to the page given in the…

controller_logoff

Controller that logs off a user, destroying the session. It also removes any “remember me” cookies the user has, so…

controller_mailinglist_export

Controller which downloads the given mailinglist id as a CSV file.

controller_mqtt_transport

Controller for transport of MQTT data between the browser (client) and server.

controller_page

Show a rsc as a HTML page.

controller_ping

Simple controller for connection tests, used on the /test/connection page.

controller_redirect

Redirect to another url.

Controllers

Controllers are the Erlang modules which decide what happens when a browser requests a page. Zotonic looks at the…

controller_signup

Controller which displays a form to sign up (rendered from signup.tpl ).

controller_signup_confirm

Controller which displays the confirmation page where the user can confirm his signup.

controller_static_pages

Serve a static page or pages.

controller_template

Show a template.

controller_website_redirect

This controller does a redirect to the website property of the given resource.

Cookbooks

Admin cookbook Creating a custom widget on the edit page Customizing the layout of the admin edit page Customizing the…

copyright

Not yet documented.

Create a custom controller

Zotonic comes with a large collection controllers that cover many use cases, so you’ll probably have to resort to…

Create a custom filter

Create custom template filters to change the way variables are rendered in your templates. By following some simple…

Create a custom model

In this chapter we will look at how to implement a model around the The Open Movie Database (OMDB) API.

Create a custom tag

Custom tags, internally called scomps , are module-defined tags, which are used when the logic is too complex to be…

Creating a custom widget on the edit page

Why For an imaginary webshop edit page, we want to add 2 more data fields: the affiliate URL and a note about free…

Creating sites

Initialize your site with a proper data model and some resources through manage_schema .

CSS classes used in templates

If you are building a website then you might want to use the standard dialogs, overlays, authentication and other parts…

custom

See also

Customizing the layout of the admin edit page

Why After having created a custom widget (see Creating a custom widget on the edit page), we want to hide widgets that…

Customizing the sign up and sign in form

You want to change parts of the form, or change its appearance.

Customizing the style of an admin page

How to make style customizations to admin pages.

Custom pivots

Search can only sort and filter on resources that actually have a database column. Zotonic’s resources are stored in a…

custom_redirect

Not yet documented.

Custom search

Implement a custom search by observing the search_query notification in your module. Imagine you want to search cookies…

cycle

Rotate through a list of values.

date

Validate input date against a given date format.

date

See also

datediff

See also

date_range

See also

Dates

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…

debug

Shows which variables are assigned for use in the current template’s scope:

Debugging db (query) issues

Techniques for finding root cause when queries are involved.

default

See also