Skip to content
Zotonic
  • Start
  • Cookbook
  • 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
  • Transform
  • Identifier

to_name

Module

mod_base

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

Example:

{{ "Hello World!"|to_name }}

Results in the string value hello_world.

Edit on GitHub

Related documentation

Filters

slugify

Converts a text into a slug.

Filters

as_atom

Convert a value to an Erlang atom.

Filters

sha1

Translate a string to a sha1 hex value.

Filters

md5

Translates a string to a md5 hex value.

Filters

gravatar_code

Calculate the gravatar code for an e-mail address:

Filters

to_boolean

Convert the input to a boolean value.

Filters

floor

Round down a floating point value.

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

truncatechars

Truncate a text to a maximum length in characters.

GitHub © 2026 Zotonic