Reference

All Reference

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…

observe_survey_submit/2

A survey has been filled in and submitted.

observe_tkvstore_delete/2

Delete a value from the typed key/value store

observe_tkvstore_get/2

Get a value from the typed key/value store

observe_tkvstore_put/2

Put a value into the typed key/value store

observe_translate/2

Request a translation of a list of strings. The resulting translations must be in the same order as the request. This…

observe_url_abs/2

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

observe_url_fetch_options/2

Determine the URL fetch options for fetching the content of an URL. Used by z_fetch.erl.

observe_url_rewrite/3

Rewrite a URL after it has been generated using the z_dispatcher

observe_user_context/3

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

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…

observe_validate_query_args/3

Called just before validation of all query arguments by z_validation.

Other notifications

action_event_type activity activity_send admin_edit_blocks admin_menu admin_rscform category_hierarchy_save…

overlay_close

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

overlay_open

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

overrules

See also

Page handling

redirect reload

page_path_unique

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

pager

Show a pager for search results.

parse_url

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

pickle

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

Pivot notifications

pivot_fields pivot_rsc_data pivot_update custom_pivot

poll

Show a given survey (with the id parameter) as a “poll”. This presents a simpler interface, in which the user is…

Port configurations

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

postback

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

postback

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

postback_event

Message sent by a user-agent on a postback event. Encapsulates the encoded postback and any additional data. This is…

pprint

Pretty print a zotonic value in a template.

predicate

Retrieve information about predicates. Predicates are the labels on edges (connections between resources) that give…

Predicates and Connections

dialog_predicate_new link unlink

presence

Check if an input has been filled in or checked.

print

See also

publish

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

rand

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

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…

randomize

Shuffle a list of values.

range

Generate a list of integers, with an optional step.

ratelimit

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

raw

Make a literal section which does not interpret tags.

rdf

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

redirect

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

Reference

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

regroup

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

Regular Expressions

match replace

reload

Reload the current page.

remove

Remove an element from the page.

remove_class

Remove a CSS class from an HTML element.

render

Render a template.

replace

Replace the target HTML element by new one.

replace

Regular expression replacement of a pattern with a string.

replace_args

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

req

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

reset

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

Resource lists

group_firstchar group_title_firstchar is_a is_not_a is_visible media_for_language

Resource notifications

rsc_delete rsc_get rsc_import_fetch rsc_insert rsc_merge rsc_pivot_done rsc_query_item rsc_update rsc_update_done…

Resources

admin_merge_diff content_type_label content_type_urls summary temporary_rsc

Resources

delete_media delete_rsc dialog_delete_rsc dialog_duplicate_rsc dialog_edit_basics dialog_media_upload dialog_new_rsc…

reversed

Reverse a list.

rjust

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

round

Round a floating point value to the nearest integer.

round_significant

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

rsc

The main resource model, which is the central part of the Zotonic data model. This model provides an interface to all…

rsc_export

Export a full resource representation for API and model access.

rsc_gone

This model tracks deleted resources (see m_rsc). Its primary goal is to be able to determine if a resource never…

rsc_import

Import model for resources exported by m_rsc_export .

rsc_update

Resource update helper module used by m_rsc .

sanitize_html

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

sanitize_url

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

script

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

script

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

Search

moreresults

search

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

search_status

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

seo

Model for SEO-related settings and generated SEO metadata, including webmaster verification keys, analytics settings

seo_sitemap

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

server_storage

Model to access the server side storage of data.

set_class

Set the class of an element.

set_url_language

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

set_value

Set the value of a form field.

sha1

Translate a string to a sha1 hex value.

show

Show an element without any animation.

show_media

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

signup

Exported APIs:

site

Retrieve information that is stored in the site configuration. If you want to query values from the config table…

Site configuration

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

site_update

Model for checking if a site has version control enabled.

slice

Perform array-slice operations on a list or string.

slide_down

Show an element by animating the height.

slide_fade_in

Show an element by animating the height and opacity.

slide_fade_out

Hide an element by animating the height and opacity.

slide_toggle

Toggle an element by sliding it up and down.

slide_up

Hide an element by animating the height.

slugify

Converts a text into a slug.

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…

sortable

Mark an element as sortable.

sorter

A sorter is a container for sortables.

spaceless

Removes whitespace between HTML tags.

spinner

Add an AJAX activity indicator.

split

Splits the filter value into a list of values.