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

ez_content_name

=20 =20

Version compatibility

This Twig helper is available as of eZ Publish 5.2 / 2013.09

Description

ez_content_name() is a Twig helper allowing to display a Co= ntent item's name in the current language.

If the current language cannot be found as a translation for content, name = in main language is always returned. This behavior is identical when forcin= g a language.

Prototype and Arguments

ez_content_name( eZ\Publish\Core\Repository\Value= s\Content\Content content[, string forcedLang= uage)
ez_content_name(
= contentInfo[, string forcedLanguage) 

Argument name Type Description
content eZ\Publish\Core\Repository\V= alues\Content\Content
or
eZ\Publi= sh\Core\Repository\Values\Content\ContentInfo 
Content or ContentInfo object the displayable fi= eld belongs to.
forcedLanguage string Locale we want the content name tr= anslation in (e.g. "fre-FR"). Null by default (takes current locale)

Usage

 

=20
<h2>Content name in current language: {{ ez_content_name(&nbs=
p;content ) }}</h2>
<h2>Content name in current language, from ContentInfo: {{ ez_content=
_name( content.contentInfo ) }}</h2>
<h2>Content name in french (forced): {{ ez_content_name( content, "fr=
e-FR" ) }}</h2>
=20

 

 

 

------=_Part_3055_1955405770.1485851805670--