Browse by topic

Discover Documentation

Explore related documentation through its most useful keyword groups.

1435 items

Grouped by Architecture

All Documentation

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.

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

Site configuration and enabled modules

A site is identified by its application and priv/zotonic_site configuration. Supported formats include Erlang .config, JSON, and YAML; follow the format…

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.

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.

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

Test Erlang behavior with focused examples

Keep domain logic in small functions that accept explicit inputs. Test expected results, boundary values, and meaningful error cases without starting a full…

Developer guide

Test the database connection

Run bin/zotonic connectdb to test a connection using the global Zotonic database configuration. It does not open PostgreSQL’s interactive client and has no…

Developer guide

Test with different users

Choose roles that exercise the operation's permission boundary: anonymous visitor, limited editor, and administrator. Use separate browser sessions or an…

Reference

The addsite command

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

Developer guide

The Zotonic workspace

The checkout is an Erlang umbrella project: one build contains many applications.