Browse by topic

Discover Documentation

Explore related documentation through its most useful keyword groups.

1031 items

Grouped by Architecture

All Documentation

Filters

slugify

Converts a text into a slug.

Filters

sort

The sort filter takes a list of items to sort. Items can be an ordinary list of terms, property lists, or maps. It can also be a list of resource ids to be…

Scomp

sortable

Mark an element as sortable.

Scomp

sorter

A sorter is a container for sortables.

Tags

spaceless

Removes whitespace between HTML tags.

Scomp

spinner

Add an AJAX activity indicator.

Filters

split

Splits the filter value into a list of values.

Filters

split_in

This filter split a list in shorter lists. It splits an array in N sub-arrays of more or less equal length. This is useful when displaying a list of items in…

Models

ssl_letsencrypt

Model for Let's Encrypt status information, available to administrators.

Filters

stringify

Translates atoms, integers and floats to strings. The undefined value is translated to the empty string. Does not translate tuples.

Filters

striptags

Removes all HTML tags from the value.

Filters

sub_day

Subtracts a day from a date. The value must be of the form {{Y,M,D},{H,I,S}} .

Filters

sub_hour

Subtracts an hour from a date. The value must be of the form {{Y,M,D},{H,I,S}} .

Actions

submit

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

Filters

sub_month

Subtracts a month from a date. The value must be of the form {{Y,M,D},{H,I,S}} .

Filters

sub_week

Subtracts a week from a date. The value must be of the form {{Y,M,D},{H,I,S}} .

Filters

sub_year

Subtracts a year from a date. The value must be of the form {{Y,M,D},{H,I,S}} .

Filters

sum

Sum a list of numbers.

Filters

summary

Extract a summary from a resource.

Models

survey

Model for survey reporting and participant state, including results, totals, per-user answers, exports, and result handlers.

Filters

survey_any_correct_answer

Determine if any answer of a question was correct. Used for showing results of thurstone test questions.

Filters

survey_any_wrong_answer

Determine if any answer of a question was wrong. Used for showing results of thurstone test questions.

Filters

survey_as_pages

Split the page blocks into pages, prepare them for easy display in the survey question editor.

Filters

survey_is_history_back

Test whether a survey respondent may return to the previous page in a history.

Filters

survey_is_save_intermediate

Check if the given survey is configured to save intermediate results. Always returns a boolean value.

Filters

survey_is_stop

Check if there is a ‘stop’ question in list of (survey) blocks

Filters

survey_is_submit

Check if the questions end with a question type that is a submit button.

Models

survey_saved

Model for saving and retrieving intermediate survey answers for users. There can only be a single intermediate result per user/survey or, for anonymous users…

Scomp

survey_start

Show the first page for a given survey (with the id parameter):

Filters

survey_test_max_points

Counts the total of all points that can be received for all test questions. Non test questions are not counted.

Scomp

tabs

Make a HTML element into a tab set.

Filters

tail

Fetch the tail of a list.

Actions

template

Render a template. When used in a postback action, the result will be sent back with the response data for the postback.

Models

template

Model for dynamic template rendering. It renders a template path passed in the request path and returns the rendered template output.

Developer guide

Templates

Templates are text files marked up using the Zotonic template language. Zotonic interprets that mark-up to dynamically generate HTML pages. Zotonic’s template…

Tags

templatetag

Not implemented, but exists in Zotonic for forward compatibility with future ErlyDTL and Django versions.

Filters

temporary_rsc

Creates a temporary resource if its input value is not defined.

Developer guide

Testing sites

It is possible to create end-to-end integration tests for Zotonic websites. Tests like these are called sitetests . They run within the Zotonic shell

Reference

The addsite command

Adding a site to Zotonic is done through the zotonic shell command. It syntax is like this:

Developer guide

The Status site

The Zotonic “status” site is the first thing you see once you have installed Zotonic, or if you do not have any sites configured yet.

The Status site

User guide

The Zotonic data model

Zotonic’s data model is a pragmatic implementation of the Semantic Web: a mixture between a traditional database and a triple store.

The Zotonic data model

Filters

timesince

Show a readable version of a date/time difference.

Models

tkvstore

Simple read-only interface to the typed key-value store of module#mod_tkvstore. To get a value from the store: use m.tkvstore.type.key, like this:

Filters

to_binary

Convert the input to a binary value.

Filters

to_boolean

Convert the input to a boolean value.

Filters

toc

Filter to derive a Table Of Contents from a HTML body.

Actions

toggle

Toggle the visibility of an element.

Actions

toggle_class

Toggle a CSS class from an HTML element.

Filters

to_integer

Convert the input to an integer value.

Filters

to_json

Display any value as in JSON (JavaScript Object Notation).

Filters

tokens

Returns a list of tokens from input string, separated by the characters in the filter argument.

Filters

to_name

Map a string to a name . That is a lowercased string with only [a-z0-9_] characters.

Tags

trans

Translate a text value using gettext.

Tags

trans_ext

Translate a text value using gettext and substitute variables.

Filters

trans_languages

Return a list of all languages present in the given translated text ( #trans{} record).

Filters

translate

Translates a (English) value to the current language or the given language.

Filters

translated_texts

Check all properties of a map, list or resource. Returns a list of all properties that are translated (have a #trans{} record) and their translations.

Models

translation

The m_translation model gives easy access to language and translation related information.

Developer guide

Translation

Many sites need to support content and templates in multiple languages. Luckily, Zotonic is completely multilingual, out of the box. mod_translation does all…

Filters

translation

Lookup a specific translation in a translated text. If the text is not translated then the text is returned as-is.

Actions

trigger_event

Trigger a named {% wire %} event in the browser. The required name argument identifies the wire; every other action argument is passed to the named event.

Filters

trim

Removes whitespace at the start and end of a string.

Developer guide

Troubleshooting

Installation Zotonic won’t start and shows errors when running zotonic debug Check your site’s database configuration.

Filters

truncate

Truncate a text to a maximum length.

Filters

truncatechars

Truncate a text to a maximum length in characters.

Filters

truncate_html

Truncate a HTML text to a maximum length.

Actions

typeselect

Show possible selections whilst typing.

Filters

unescape

Removes HTML escaping from a text.

Actions

unlink

Remove an edge between two resources. Used in the admin.

Actions

unmask

Removes a mask that was placed over an element using the action#mask action.

Actions

update

Updates the content of an HTML element with a template or a literal HTML text.

Cookbook

Updating form field from a dialog

Ever wanted to update a form field from a dialog, possibly giving the user some list to choose from? Here’s how to do it.

Developer guide

Upgrade notes

These notes list the most important changes between Zotonic versions. Please read these notes carefully when upgrading to a new major Zotonic version.

Filters

upper

Translates the value to upper case.

Filters

url

Generates the relative URL for the given dispatch information.

Tags

url

Generate the URL for a named dispatch rule. In this way it is possible to automatically change the generated URLs when the dispatch rules are modified.

Filters

url_abs

Generates an absolute URL for the given dispatch information.

Filters

urldecode

Decode a text where characters are encoded as URL-safe characters.

Filters

urlencode

Make a text safe for URLs.

Filters

urlize

Find urls in the given input and make them clickable.

Tags

use

Render a named fragment defined with tag#fragment.

Tags

useblock

Render a named tag#fragment, pass it enclosed body content, and optionally override its named blocks.

User guide

User Guide

Welcome to the Zotonic User Guide. This guide is a non-technical introduction to Zotonic.

User guide

User management

Create new users In the admin, under ‘Auth’ > ‘Users’ you can find a list of all users. Use the ‘Make a new user’ button to create a new user with a username…

Validators

username_unique

Check if an entered username is unique by querying model#identity for the given username:

Filters

utc

Translates a datetime from local time to UTC.