Message-ID: <1972838492.3052.1485851795916.JavaMail.confluence@ip-10-127-227-164> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_3051_798972393.1485851795907" ------=_Part_3051_798972393.1485851795907 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

AVAILABLE A= S OF 5.2 / 2013.09

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 rendering by yoursel= f.

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

Prototype and Arguments

ez_field_value( eZ\Publish\Core\Repository\Values= \Content\Content content, string fieldDefIdentifie= r[, string forcedLanguage)

Argument name Type Description
content eZ\Publish\Core\Repository\V= alues\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

 

 

 

------=_Part_3051_798972393.1485851795907--