Text

All Text

Strings

append capfirst center filesizeformat format_duration format_integer format_number format_price insert is_valid_email…

Numbers

filesizeformat format_duration format_integer format_number format_price is_even is_number max min minmax rand round…

Miscellaneous

gravatar_code twitter ip2country ip2geo is_letsencrypt_valid_hostname

Menu

menu_flat menu_is_visible menu_expand menu_rsc menu_subtree menu_trail

Lists

after before chunk exclude filter first flatten_value group_by index_of is_list join last length make_list member…

HTML

show_media striptags truncate_html sanitize_html sanitize_url urlize embedded_media without_embedded_media…

Forms

pickle

Character escaping

brlinebreaks escape escape_check escape_ical escape_link escapejs escapejson escapexml fix_ampersands force_escape…

Encryption

md5 sha1

Binaries

first last length to_binary

to_json

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

default

Provide an alternative value in case a value has a falsy value (0, false , undefined or empty string).

trans_filter_filled

Filters all empty translations from a property.

language_sort

Sort a list of language codes or map with languages on their name. Return a list of {Code, LanguageProps} pairs.

language

Return the language the resource (or translated text) will be displayed in.

is_rtl

Check if the given language is a rtl or ltr language.

truncate

Truncate a text to a maximum length.

trim

Removes whitespace at the start and end of a string.

to_name

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

insert

Prepends the argument in front of the value.

log_format_stack

Escapes and formats a Javascript string with a stack trace to readable HTML.

append

Appends the argument to the value.

to_integer

Convert the input to an integer value.

round

Round a floating point value to the nearest integer.

is_even

Test if an integer value is even:

filesizeformat

This filter formats a numeric value as KB, MB etc. This filter can be used to display a number of bytes in a human…

ip2geo

Maps an IP address to information about that country.

twitter

Format a plain text Tweet into HTML.

gravatar_code

Calculate the gravatar code for an e-mail address:

menu_is_visible

Filters a list of menu items on visibility and existance. Only top-level menu items that are both visible and exist are…

vsplit_in

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

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…

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…

range

Generate a list of integers, with an optional step.

member

Finds a value in a list.

make_list

Forces the value to a list.

is_list

Test if a value is a list:

index_of

Returns the index of the first occurrence of the item in the given list.

group_by

Groups items of a list by a property.

flatten_value

Flatten a list to a comma separated string.

before

Return the first element before another element in a list. For example:

after

Return the first element after another element in a list. For example:

urlize

Find urls in the given input and make them clickable.

truncate_html

Truncate a HTML text to a maximum length.

pickle

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

urlencode

Make a text safe for URLs.

unescape

Removes HTML escaping from a text.

linebreaksbr

Translate ASCII newlines ( \n ) into HTML <br /> elements.

fix_ampersands

Replaces ampersands in the value with “&amp;” entities.

escapexml

Escape the value for insertion in xml output.

escape_link

Convert any URLs in a plaintext into HTML links, with adding the rel="nofollow" attribute.

brlinebreaks

Translate HTML <br/> elements into ASCII newlines ( \n ).

sha1

Translate a string to a sha1 hex value.

md5

Translates a string to a md5 hex value.

length

Returns the length of the value.

admin_dispatch

Dispatch rules Name Path Resource Args admin_user [“admin”,”users”] controller_admin [{template,”admin_users.tpl”}

mod_admin_predicate

Add support for editing predicates in the admin, by presenting a list of all defined predicates on http://yoursite.com…

dialog_predicate_new

Show a dialog for creating a new predicate.

dialog_user_add

Show a dialog for adding a user. This creates a person resource and adds a username / password to it.

without

Remove the items given in the argument from the filter value.

template

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

Templates

template

media_upload_preprocess

Notification to translate or map a file after upload, before insertion into the database Used in mod_video to queue…

Best Practices

Creating sites Media Best Practices Template Best Practices and Pitfalls

media_upload_rsc_props

Notification that a medium file has been uploaded. This is the moment to change resource properties, modify the file…

mod_facebook

The mod_facebook module plugs into the authentication systen to enable Facebook login on your site.

m_facebook

Not yet documented.

m_predicate

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

embedded_media

Fetch media ids that are embedded in the body , body_extra and text blocks of your page.

without_embedded_media

Filter out media ids that are embedded in the body , body_extra and text blocks of your page.

Configuration

Global configuration Site configuration Port configurations

Resources

admin_merge_diff content_type_label content_type_urls summary temporary_rsc

mod_video

Adds support for viewing and handling video medium items.

mod_video_embed

This module, if activated, checks the pasted URLs in the create media / page dialog of the admin. It will show an embed…

controller_website_redirect

This controller does a redirect to the website property of the given resource.

controller_static_pages

Serve a static page or pages.

controller_signup_confirm

Controller which displays the confirmation page where the user can confirm his signup.

controller_signup

Controller which displays a form to sign up (rendered from signup.tpl ).

controller_redirect

Redirect to another url.

controller_mqtt_transport

Controller for transport of MQTT data between the browser (client) and server.

controller_mailinglist_export

Controller which downloads the given mailinglist id as a CSV file.

controller_logoff

Controller that logs off a user, destroying the session. It also removes any “remember me” cookies the user has, so…

controller_language_set

Controller which sets the language as given in the code argument, and redirects the user back to the page given in the…

controller_http_error

This controller is called for serving http error pages.

controller_api

controler_api processes authorized REST API requests: It provides an easy way to create API calls to allow computer…

controller_admin_seo

Shows a form with settings related to Search Engine Optimization.

controller_admin_referrers

Shows the list of pages ( resources) which refer to this resource through an edge.

controller_admin_module_manager

Shows the list of Zotonic modules currently known to the system.

controller_admin_mailinglist_recipients

Shows the recipients of the current mailing list. The recipients are listed in three columns, and have a checkbox next…