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
  • Metadata
  • Template filter
  • Format

content_type_label

Module

mod_base

Return a translated, human-readable label for a MIME content type.

Known types have descriptive labels such as JSON, Excel Workbook, and iCalendar. Other types are represented by their uppercase file extension. The input can be a MIME type string or a parsed Cowboy media-type tuple.

For example:

{{ "application/json"|content_type_label }}

Edit on GitHub

Related documentation

Filters

media_exif_value

Formats EXIF values for display in templates.

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.

Filters

date

Formats a date or datetime according to the format specified in the argument.

Filters

language_dir

Return rtl or ltr depening on the direction of the language.

Filters

capfirst

Converts the first character of the value to uppercase.

Filters

lower

Translates the value to lower case.

Filters

ljust

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

GitHub © 2026 Zotonic