Browse by topic

Discover Documentation

Explore related documentation through its most useful keyword groups.

1031 items

Grouped by Architecture

All Documentation

Notifications

observe_survey_result_columns/3

Add header columns for export. The values are the names of the answers and the text displayed above the column. The text format is for a complete export, the…

Notifications

observe_survey_result_column_values/3

Modify row with answers for export. The header columns are given and the values that are known are set in the folded value. The user_id is the user who filled…

Notifications

observe_translate/2

Request a translation of a list of strings. The resulting translations must be in the same order as the request. This notification is handled by modules that…

Notifications

observe_url_abs/2

Make a generated URL absolute, optionally called after url_rewrite by z_dispatcher

Notifications

observe_user_context/3

Set #context fields depending on the user and/or the preferences of the user.

Notifications

observe_user_is_enabled/2

Check if a user is enabled. Enabled users are allowed to log in. Return true , false or undefined . If undefined is returned, the user is considered enabled if…

Actions

overlay_close

Closes the currently open overlay. When there is no overlay open then nothing happens.

Actions

overlay_open

Renders a template on the server and opens a full screen overlay with the HTML output of the template.

Cookbook

Overriding Zotonic

This chapter describes how to override the templates, styling and logic provided by Zotonic.

Tags

overrules

Inherit markup from like named template in another module.

Validators

page_path_unique

A validator to check whether a resource’s page path is unique:

Scomp

pager

Show a pager for search results.

Filters

parse_url

Parses an URL (URI) using uri_string:parse/1 .

Filters

pickle

Pickle an Erlang value so that it can be safely submitted with a form.

Cookbook

Pivot Templates

Search uses database indices on special pivot columns and full text fields.

Scomp

poll

Show a given survey (with the id parameter) as a “poll”. This presents a simpler interface, in which the user is directly asked to enter some information, e.g.

Reference

Port configurations

Port configurations can be tricky, especially in combination with SSL. Here we explain all steps to come to a correctly configured installation with working…

Validators

postback

Performs a custom server side validation of an input value. This allows you to add your own validation logic to HTML form fields.

Actions

postback

This action sends a message to the event handler on the server.

Filters

pprint

Pretty print a zotonic value in a template.

Models

predicate

Retrieve information about predicates. Predicates are the labels on edges (connections between resources) that give meaning to an edge. An example is the…

Validators

presence

Check if an input has been filled in or checked.

Tags

print

Show the contents of a value expression.

Developer guide

Proxying Zotonic with nginx

It is possible to put Zotonic behind the nginx <http://nginx.org/> web server, for example if you have other, non-Zotonic virtual hosts running on your system.

Actions

publish

Publishes a message on the topic tree of the current page.

Filters

rand

Generates a random number. The number is from, and including, 1 up to, and including, the input value.

Filters

random

Returns a random value from a list of values. When the input is an empty list or not a list then the result is undefined.

Filters

randomize

Shuffle a list of values.

Filters

range

Generate a list of integers, with an optional step.

Models

ratelimit

Model for exposing current ratelimit timeout information for the active request context.

Tags

raw

Make a literal section which does not interpret tags.

Models

rdf

Model for RDF summaries of resources. It provides short RDF-oriented summary maps for resources, with translated and non-translated variants.

Actions

redirect

This action redirects the browser to another page or back to the previous page.

Actions

redirect_incat

Redirect the admin editor to the next or previous resource in a category.

Reference

Reference

All the nitty gritty details when the big picture has settled.

Tags

regroup

Not implemented tag, for forward compatibility with future ErlyDTL and Django versions.

Documentation

Release Notes

Every time a Zotonic release is made, we create a document which lists the most important changes. This page contains links to the release notes for each…

Actions

reload

Reload the current page.

Actions

remove

Remove an element from the page.

Actions

remove_class

Remove a CSS class from an HTML element.

Filters

render

Render a template.

Actions

replace

Replace the target HTML element, including the target element itself, with rendered HTML.

Filters

replace

Regular expression replacement of a pattern with a string.

Filters

replace_args

Replace $N placeholders in string from a list of replacement values.

Models

req

This model gives access to the request variables from within a template.

Actions

reset

Resets the enclosing form, a specifically targeted form or the closest form to an element.

Developer guide

Resources

Resources are Zotonic’s main data unit. You may want to familiarise yourself with the Zotonic data model in the User Guide.

Cookbook

Retrieving the category of a page

Getting the category from a URL is somewhat involved, but not impossible. This is an example of what you can do with filters.

Filters

rjust

Justifies the value in a field of a certain width to the right, using spaces.

Filters

round

Round a floating point value to the nearest integer.

Filters

round_significant

Round a number value to a number of significant digits. The significance defaults to two digits.

Models

rsc

The main resource model, which is the central part of the Zotonic data model. This model provides an interface to all resource ("page") information. It also…

Models

rsc_export

Export a full resource representation for API and model access.

Models

rsc_gone

This model tracks deleted resources (see model#rsc). Its primary goal is to be able to determine if a resource never existed, has been deleted or has been…

Models

rsc_import

Import model for resources exported by m_rsc_export .

Models

rsc_update

Resource update helper module used by m_rsc .

Filters

sanitize_html

Sanitize a HTML code. Removes elements and attributes that might be dangerous, like <script> elements.

Filters

sanitize_url

Sanitize an URL. Removes URLs that might be dangerous, like javascript: URLs.

Scomp

script

This tag is the placeholder where all generated JavaScript scripts will be output on the page.

Actions

script

This action executes JavaScript directly. It can be used to interface with non-Zotonic JavaScript libraries and functions.

Developer guide

Search

Query arguments and terms for searching pages using the search APIs.

Models

search

The m_search model provides access to different kinds of search queries for searching through models.

Models

search_status

Model for search subsystem status, including facet table health checks and facet definition metadata.

Cookbook

Security, templates and XSS prevention

Ensuring that you don't fall victim to cross site scripting and other injection attacks takes vigilance, eye for details and especially some good naming habits.

Security, templates and XSS prevention

Models

seo

Model for SEO-related settings and generated SEO metadata, including webmaster verification keys, analytics settings, and JSON-LD output.

Models

seo_sitemap

Model for sitemap generation metadata, including available urlsets and paged urlset export values.

Developer guide

Server configuration

This chapter describes how to configure your Linux server for running Zotonic.

Models

server_storage

Model to access the server side storage of data.

Actions

set_class

Set the class of an element.

Filters

set_url_language

Change the language of an URL to another language. Useful to generate alternative URLs for a page.

Actions

set_value

Set the value of a form field.

Filters

sha1

Translate a string to a sha1 hex value.

Actions

show

Show an element without any animation.

Filters

show_media

Convert the image markers in HTML from the Rich Text editor into image tags.

Models

signup

Exported APIs:

Models

site

Retrieve information that is stored in the site configuration. If you want to query values from the config table instead, you should use model#config.

Reference

Site configuration

This chapter describes the configuration options for your sites. There’s also global configuration.

Developer guide

Sites

Zotonic has the capability of serving more than one site at a time. You can have multiple sites enabled, each with its own set of templates, database and…

Models

site_update

Model for checking if a site has version control enabled.

Filters

slice

Perform array-slice operations on a list or string.

Actions

slide_down

Show an element by animating the height.

Actions

slide_fade_in

Show an element by animating the height and opacity.

Actions

slide_fade_out

Hide an element by animating the height and opacity.

Actions

slide_toggle

Toggle an element by sliding it up and down.

Actions

slide_up

Hide an element by animating the height.