Skip to content
Zotonic
  • Start
  • Guides
  • Reference
  • Releases

Live search

Search across all Zotonic content

Type at least two characters

Results are matched against titles, summaries and topics as you type.

Filters · mod_base
  • Reference
  • Frontend developer
  • Template filter
  • Parse
  • Text
  • Collection

tokens

Module

mod_base

Returns a list of tokens from input string, separated by the characters in the filter argument.

This is filter maps directly onto the string:tokens/2 function in stdlib from the Erlang/OTP distribution.

Example:

{{ "abc defxxghix jkl"|tokens:"x " }}

Will give the list of tokens: ["abc", "def", "ghi", "jkl"].

Edit on GitHub

Related documentation

Filters

survey_prepare_narrative

Parse a survey narrative question into renderable text and input parts.

Filters

survey_answer_split

Filter to split multi-value survey answers on the '#' character.

Filters

extract

Extract a specific property from each item in a list.

Filters

sum

Sum a list of numbers.

Filters

filter_by

Filter a list of items based on a property value and optional predicate.

Filters

language_sort_localized

Sort a list of language codes or map with languages on their localized name in the currently selected language. This is useful for…

Filters

merge_tags

A mail-merge like filter where tag-expressions in a text are replaced with the value of their evaluation.

Filters

from_json

Parse a string as a JSON (JavaScript Object Notation) value. The returned value can be processed futher.

Filters

truncatechars

Truncate a text to a maximum length in characters.

GitHub © 2026 Zotonic