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

ez_field_value

=20
=20
=20
=20

Description

ez_field_value() is a Twig helper which returns a Content i= tem's field value in the current language.

This can be useful when you don't want to use ez_render_field  and manage the renderin= g by yourself.

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_value( eZ\Publish\API\Repository\Values\= Content\Content content, string fieldDefIdentifier= [, string forcedLanguage)

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 value: {{ ez_field_value( content, "title" =
) }}</h2>
=20

=20
=20
=20
=20

=20
=20
=20
------=_Part_3803_1440227934.1485855426386--