>= 5.4 / 2014.09
Description
ez_field_name()
is a Twig helper which returns a Content item's field FieldDefinition name in the current language.
This can be useful when you don't want to use sub request and custom controller to be able to display this information.
Prototype and Arguments
ez_field_name( Content|ContentInfo content, string fieldDefIdentifier[, string forcedLanguage] )
Argument name | Type | Description |
---|---|---|
content | eZ\Publish\Core\Repository\Values\Content\Content or
| Content / ContentInfo object the fieldDefIdentifier belongs to. |
fieldDefIdentifier | string | Identifier of the field we want to get the FieldDefinition name from. |
forcedLanguage | string | Language we want to force (e.g. "jpn-JP "), otherwise takes prioritized languages from SiteAccess settings. |
Usage