Message-ID: <599627959.3802.1485855419096.JavaMail.confluence@ip-10-127-227-164> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_3801_2101723907.1485855419096" ------=_Part_3801_2101723907.1485855419096 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html ez_field_name

ez_field_name

=20
=20
=20
=20

Description

ez_field_name() is a Twig helper which returns a Content it= em's field FieldDefinition name in the current language.

This can be useful when you don't want to use a sub-request and custom c= ontroller to be able to display this information.

If the current language cannot be found as a translation for content, the m= ain language will be used. This behavior is identical when  forcing a language using  forcedLanguage.

Prototype and Arguments

ez_field_name( Content|ContentInfo content, string fieldDefIdentifier[, string forcedLanguage)

Argument name Type Description
content eZ\Publish\API\Repository\Va= lues\Content\Content or
eZ\Publish\API\Repository\Val= ues\Content\ContentInfo 
Content / ContentInfo object the fi= eldDefIdentifier 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. "<= code>jpn-JP"), otherwise takes prioritized languages from SiteAccess= settings.

Usage

=20
<label for=3D"ez-content-article-title">{{ ez_field_name(&nbs=
p;content, "title" ) }}</label>
=20
=20
=20
=20
=20

=20
=20
=20
------=_Part_3801_2101723907.1485855419096--