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
  • Format
  • Text

ljust

Module

mod_base

Justifies the value in a field of a certain width to the left, with spaces.

For example:

{{ value|ljust:7 }}

When value is hello then the output is hello__ (with spaces).

Justifying only works for single byte character values. At this moment there is no support for multi-byte unicode characters.

Edit on GitHub

Related documentation

Filters

upper

Translates the value to upper case.

Filters

capfirst

Converts the first character of the value to uppercase.

Filters

lower

Translates the value to lower case.

Filters

stringify

Translates atoms, integers and floats to strings. The undefined value is translated to the empty string. Does not translate tuples.

Filters

summary

Extract a summary from a resource.

Filters

rjust

Justifies the value in a field of a certain width to the right, using spaces.

Filters

center

Centers the value in a field of a certain width using spaces.

Filters

media_exif_value

Formats EXIF values for display in templates.

Filters

merge_tags

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

GitHub © 2026 Zotonic