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

ez_field

=20
=20
=20
=20

V1.2=

Description

ez_field() is a Twig helper which returns a field value in = the current language.

Note that other Twig helpers are available to display specific informati= on of the field ; they all star= t with ez_field_.

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

Prototype and Arguments

ez_field( eZ\Publish\API\Repository\Values\Conten= t\Content content, string fieldDefIdentifier[, string forcedLanguage)<= /code>

Argument name Type Description
content eZ\Publish\API\Repository\Va= lues\Content\Content Content object the field referred to with fieldDefIdentifier belongs to.
fieldDefIdentifier string Identifier of the field we want to= get the value from.
forcedLanguage string Locale we want the content name tr= anslation in (e.g. "fre-FR"). Null by default (takes current locale)

Usage

=20
<h2>My title's id: {{ ez_field( content, "title" ).id }}=
</h2>
=20
=20
=20
=20
=20

=20
=20
=20
------=_Part_3797_1505205756.1485855409805--