Filters
Filters transform template variables before they are rendered.
Filters transform template variables before they are rendered.
Adds a day to a date. The value must be of the form {{Y,M,D},{H,I,S}} .
Adds an hour to a date. The value must be of the form {{Y,M,D},{H,I,S}} .
Adds a month to a date. The value must be of the form {{Y,M,D},{H,I,S}} .
Adds a week to a date. The value must be of the form {{Y,M,D},{H,I,S}} .
Adds a year to a date. The value must be of the form {{Y,M,D},{H,I,S}} .
Return the first element after another element in a list. For example:
Appends the argument to the value.
Convert a value to an Erlang atom.
Return the first element before another element in a list. For example:
Translate HTML <br/> elements into ASCII newlines ( \n ).
Converts the first character of the value to uppercase.
Centers the value in a field of a certain width using spaces.
This filter splits a list in shorter lists. It splits an array in sub-arrays of at most a given length. This is useful…
Formats a date or datetime according to the format specified in the argument.
Calculate the difference between two dates, returning a single part of that difference.
Show a date range.
Provide an alternative value in case a value has a falsy value (0, false , undefined or empty string).
Select an element from a tuple or list of tuples.
Fetch media ids that are embedded in the body , body_extra and text blocks of your page.
Tests if the value is a date and equal to the argument. The value and the argument must be a tuple of the format {Y,M
HTML escape a text. Escapes all reserved HTML characters in the value. Escaped strings are safe to be displayed in a…
Ensures thant an HTML escaped value is properly escaped.
Escape the value according to the RFC2445 rules.
Escapes the value for insertion in JavaScript output.
Escapes the value for insertion in JSON output.
Convert any URLs in a plaintext into HTML links, with adding the rel="nofollow" attribute, and replaces all newlines…
Escape the value for insertion in xml output.
Filters a list on the value of a property, either on absence or inequality.
This filter formats a numeric value as KB, MB etc. This filter can be used to display a number of bytes in a human…
Filters a list on the value of a property, either on presence or equality.
Returns the first character or element.
Replaces ampersands in the value with “&” entities.
Flatten a list to a comma separated string.
HTML escapes a text.
format_dispatch_controller_option
Format dispatch controller options.
Format dispatch path element so variables will be more visible.
Show a duration in hours, minutes and seconds.
Show an integer value.
Show an integer or float.
Show a price with decimals.
Calculate the gravatar code for an e-mail address:
Groups items of a list by a property.
Group a list of sorted resource ids on their first letter of the title or another rsc property. After grouping, it…
Similar to group_firstchar, but always uses the title column from the rsc table.
Selects an argument depending on a condition.
Tests whether a value is undefined, returning the given argument.
Returns the index of the first occurrence of the item in the given list.
Tests if a date is in the future.
Adds recipient query string details to hyperlinks.
Tests if a date is in the past.
Prepends the argument in front of the value.
Maps an IP address to a country using the MaxMind GeoIP2 database.
Maps an IP address to information about that country.
Filter a list of resource ids on category, or test if a single resource id belongs to a category.
Tests if a value is defined.
Test if an integer value is even:
Test if a hostname can be used for a Let’s Encrypt certificate.
Test if a value is a list:
is_not_a mirrors is_a. It is particularly useful when iterating over a category and excluding members of a sub-category…
Test if a value is a number (integer or floating point):
Check if the given language is a rtl or ltr language.
Test if the given URL is a url for the current site.
Tests if a value is undefined.
Filter a list of resource ids so that only the visible ids remain.
Joins the elements of a list. Joins the elements of the input list together, separated by the argument.
Return the language the resource (or translated text) will be displayed in.
Return rtl or ltr depening on the direction of the language.
Sort a list of language codes or map with languages on their name. Return a list of {Code, LanguageProps} pairs.
Returns the last character or element.
Returns the length of the value.
Translate ASCII newlines ( \n ) into HTML <br /> elements.
Justifies the value in a field of a certain width to the left, with spaces.
Escapes and formats a Javascript string with a stack trace to readable HTML.
Translates the value to lower case.
mailinglist_recipient_key_decode
Used on the mailing list subscriptions page where users and recipients can unsubscribe from mailinglists.
Forces the value to a list.
Match a value with a regular expression.
Take the maximum of the filter value and its first argument.
Translates a string to a md5 hex value.
Filter a list of media items by their medium_language property, return the best matching with the current or given…
Finds a value in a list.
Takes a menu, or a menu resource id, and adds all haspart objects connected to the menu ids.
Flattens the rsc menu structure for use in a template loop.
Returns all resource ids in a menu. Could return invisible and non existing resource ids. The returned ids are a flat…
Filters a list of menu items on visibility and existance. Only top-level menu items that are both visible and exist are…
Return the menu to be displayed with a resource.
Get the subtree of an id in a menu (if any).
Return a breadcrumb navigation trail for the given id.
Take the minimum of the filter value and its first argument.
Force the given value in the given range.
Tests if two dates are not equal.
Normalize an email address, used in the identity management.
Fetch the nth tail of a list.
Parses an URL (URI) using uri_string:parse/1 .
Pickle an Erlang value so that it can be safely submitted with a form.