Description
ez_content_name()
is a Twig helper which allows displaying a Content item's name in the current language.
Prototype and Arguments
ez_content_name( eZ\Publish\API\Repository\Values\Content\Content content[, string forcedLanguage] )
ez_content_name(contentInfo[, string forcedLanguage] )
Argument name | Type | Description |
---|
content | eZ\Publish\API\Repository\Values\Content\Content
or eZ\Publish\API\Repository\Values\Content\ContentInfo
| Content or ContentInfo object the displayable field belongs to. |
forcedLanguage | string | Locale we want the content name translation in (e.g. "fre-FR"). Null by default (takes current locale) |
Usage
Equivalent PHP code
Getting the translated name for a Content item
Forcing a specific language