Global navigation

   Documentation Center
   eZ Studio & eZ Platform
     User Manual
     Technical Manual
     Glossary
   eZ Publish 4.x / legacy

 
eZ Publish (5.x)

eZ Publish 5.x | For eZ Platform & eZ Studio topics see Technical manual and User manual, for eZ Publish 4.x and Legacy topics see eZ Publish legacy

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Adding twig helpers about languages management (see https://jira.ez.no/browse/EZP-25601)

eZ Publish 5.1+ comes with a Twig helper as a global variable named ezpublish.

...

PropertyDescription
ezpublish.siteaccess

Returns the current siteaccess.

ezpublish.rootLocationReturns the root Location object
ezpublish.requestedUriStringReturns the requested URI string (also known as semanticPathInfo).
ezpublish.systemUriStringReturns the "system" URI string. System URI is the URI for internal content controller. If current route is not an URLAlias, then the current Pathinfo is returned.
ezpublish.viewParametersReturns the view parameters as a hash.
ezpublish.viewParametersStringReturns the view parameters as a string.
ezpublish.siteNamelegacyReturns the name of the current siteaccesslegacy information.
ezpublish.translationSiteAccessReturns the translation SiteAccess for a given language, or null if it cannot be found.
ezpublish.availableLanguagesReturns the list of available languages.
ezpublish.legacyconfigResolverReturns legacy informationthe config resolver.

 

Legacy

Note

ezpublish.legacy is only available when viewing content in legacy fallback (e.g. no corresponding Twig templates)

 

The ezpublish.legacy property returns an object of type ParameterBag, which is a container for key/value pairs, and contains additional properties to retrieve/handle legacy information.

...