Twig Functions Reference
In addition to the native functions provided by Twig, eZ Platform offers the following:
Available Twig Functions
In this section
- ez_content_name ez_content_name() is a Twig helper which allows displaying a Content item's name in the current language.
- ez_field V1.2
- ez_field_description ez_field_description() is a Twig helper which returns a Content item's field FieldDefinition description in the current language.
- ez_field_name ez_field_name() is a Twig helper which returns a Content item's field FieldDefinition name in the current language.
- ez_field_value ez_field_value() is a Twig helper which returns a Content item's field value in the current language.
- ez_file_size ez_file_size() is a Twig helper (Twig filter) which is mostly a byte calculator. It will convert a number from byte to the correct suffix (from B to EB). The output pattern will also vary with the current language of the site access (e.g. choosing between coma or point pattern).
- ez_first_filled_image_field ez_first_filled_image_field is a Twig helper which returns the identifier of the first image field that is not empty.
- ez_image_alias ez_image_alias() is a Twig helper that lets you display a selected variant (alias) of an image.
- ez_is_field_empty ez_is_field_empty() is a Twig helper which checks if a Content item's field value is considered empty in the current language.
- ez_render_field ez_render_field() is a Twig helper allowing you to display a Content item's Field value, taking advantage of the template block exposed by the Field Type used.
- ez_trans_prop ez_trans_prop() is a generic, low level Twig helper which gets the translated value of a multi valued(translations) property.
- ez_urlalias ez_urlalias is a not a real Twig helper, but a special route name for generating URLs for a Location from the given parameters.
Contributors
- Dominika Kurek
- David Christian Liedle Updated
Comments
Add a comment