Documentation
Released on 2013-03-14 19:31 by arjan.
Released on 2013-07-02 20:53 by arjan.
Released on 2013-09-21 09:37 by arjan.
Released on 2014-04-18 16:55 by arjan.
Released on 2022-10-31.
Released on 2022-11-11.
Released on 2022-11-17.
Released on 2022-12-05.
Released on 2022-12-23.
Released on 2023-01-30.
Released on 2022-09-13.
Released on 2022-10-12.
Every time a Zotonic release is made, we create a document which lists the most important changes. This page contains…
Reload the current page.
Remove an element from the page.
Remove a CSS class from an HTML element.
Render a template.
Replace the target HTML element by new one.
Regular expression replacement of a pattern with a string.
Replace $N placeholders in string from a list of replacement values.
Refresh the context or request process for the given request or action Called for every request that is not anonymous…
Resets the enclosing form, a specifically targeted form or the closest form to an element.
Emergency password reset when you can’t get into the admin interface.
Let all modules add resource specific response headers to the request. The accumulator is the list of headers to be set.
group_firstchar group_title_firstchar is_a is_not_a is_visible media_for_language
rsc_delete rsc_get rsc_import_fetch rsc_insert rsc_merge rsc_pivot_done rsc_query_item rsc_update rsc_update_done…
delete_media delete_rsc dialog_delete_rsc dialog_duplicate_rsc dialog_edit_basics dialog_media_upload dialog_new_rsc…
Resources are Zotonic’s main data unit. You may want to familiarise yourself with the Zotonic data model in the User…
admin_merge_diff content_type_label content_type_urls summary temporary_rsc
Restore/upgrade content db from backup
Contributed by: Scott Finnie
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…
Reverse a list.
Justifies the value in a field of a certain width to the right, using spaces.
Round a floating point value to the nearest integer.
Round a number value to a number of significant digits. The significance defaults to two digits.
Resource will be deleted. This notification is part of the delete transaction, it’s purpose is to clean up associated…
Resource is read, opportunity to add computed fields Used in a foldr with the read properties as accumulator.
Fetch the data for an import of a resource. Returns data in the format used by m_rsc_export and m_rsc_import. Either…
Foldr for an resource insert, these are the initial properties and will overrule the properties in the insert request.
Map to signal merging two resources. Move any information from the loser to the winner. The loser will be deleted.
Signal that a resource pivot has been done.
Send a notification that the resource ‘id’ is added to the query query_id.
An updated resource is about to be persisted. Observe this notification to change the resource properties before they…
An updated resource has just been persisted. Observe this notification to execute follow-up actions for a resource…
Upload and replace the resource with the given data. The data is in the given format.
Running on Port 80 and Port 443
Using standard ports helps visitors discover your page and removes the awkward port number from URLs.
Sanitize an HTML element.
Sanitize an embed url. The hostpart is of the format: <<"youtube.com/v...">> .
Sanitize a HTML code. Removes elements and attributes that might be dangerous, like <script> elements.
Sanitize an URL. Removes URLs that might be dangerous, like javascript: URLs.
Add extra javascript with the {% script %} tag. (map) Used to let modules inject extra javascript depending on the…
This tag is the placeholder where all generated JavaScript scripts will be output on the page.
This action executes JavaScript directly. It can be used to interface with non-Zotonic JavaScript libraries and…
Using the query search API you can retrieve lists of resources in various ways. In your templates, you do so through…
moreresults
Map a custom search term to a #search_sql_term{} record.
Map a custom search term to a #search_sql_term{} record.
Check and possibly modify the http response security headers All headers are in lowercase.
Security, templates and XSS prevention
Ensuring that you don't fall victim to cross site scripting and other injection attacks takes vigilance, eye for…
This chapter describes how to configure your Linux server for running Zotonic.
Refresh the context or request process for the given request or action Called for every request that is not anonymous…
Set the class of an element.
Change the language of an URL to another language. Useful to generate alternative URLs for a page.
Set the language of the context to a user’s prefered language
Set the value of a form field.
Translate a string to a sha1 hex value.
Share variable binding across blocks
How to avoid having to call the same query inside several blocks of the same page
Activate/deactivate modules Filter and convert characters Erlang tab completion Debugging db (query) issues Reset a…
Show an element without any animation.
Convert the image markers in HTML from the Rich Text editor into image tags.
Request a signup of a new or existing user. Arguments are similar to #signup_url{} Returns {ok, UserId} or {error
signup_check Check if the signup can be handled, a fold over all modules. Fold argument/result is {ok, Props
Signal that a user has been confirmed. (map, result is ignored)
Fetch the page a user is redirected to after signing up with a confirmed identity
Signal that a user has been signed up (map, result is ignored)
Signup failed, give the error page URL. Return {ok, Url} or undefined. Reason is returned by the signup handler for the…
Handle a signup of a user, return the follow on page for after the signup. Return {ok, Url} ‘props’ is a map with…
This chapter describes the configuration options for your sites. There’s also global configuration.
Zotonic has the capability of serving more than one site at a time. You can have multiple sites enabled, each with its…
Performing additional, project-specific actions when a user signs up
Perform array-slice operations on a list or string.
Show an element by animating the height.
Show an element by animating the height and opacity.
Hide an element by animating the height and opacity.
Toggle an element by sliding it up and down.
Hide an element by animating the height.
Converts a text into a slug.
The sort filter takes a list of items to sort. Items can be an ordinary list of terms, property lists, or maps. It can…
Mark an element as sortable.
A sorter is a container for sortables.
Removes whitespace between HTML tags.
Add an AJAX activity indicator.
Splits the filter value into a list of values.
This filter split a list in shorter lists. It splits an array in N sub-arrays of more or less equal length. This is…
Request the SSL certificates for this site. The server_name property contains the hostname used by the client. (first…
Some interesting tidbits about saving/updating a date/time field of a resource.
Translates atoms, integers and floats to strings. The undefined value is translated to the empty string. Does not…
append capfirst center filesizeformat format_duration format_integer format_number format_price insert is_valid_email…
Removes all HTML tags from the value.
Subtracts a day from a date. The value must be of the form {{Y,M,D},{H,I,S}} .