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

format_price

Module

mod_base

Show a price with decimals.

Formats integer and float values as a number with two decimals.

For example:

{{ value|format_price }}

When the value is the float 12.1 then the output is the list 12.10.

An undefined price will have the output “-”.

Note

The decimal separator is currently always a dot, independent of the user’s language.

Edit on GitHub

Related documentation

Filters

format_number

Show an integer or float.

Filters

format_integer

Show an integer value.

Filters

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 readable format of kilo

Filters

media_exif_value

Formats EXIF values for display in templates.

Filters

floor

Round down a floating point value.

Filters

sum

Sum a list of numbers.

Filters

format_dispatch_path_element

Format dispatch path element so variables will be more visible.

Filters

format_dispatch_controller_option

Format dispatch controller options.

Filters

upper

Translates the value to upper case.

GitHub © 2026 Zotonic