eZ Publish 5 comes with a Twig helper as a global variable named ezpublish
.
This helper is accessible from all Twig templates and allows you to easily retrieve useful information.
Property | Description |
---|---|
ezpublish.siteaccess | Returns the current siteaccess. |
ezpublish.requestedUriString | Returns the requested URI string (also known as semanticPathInfo). |
ezpublish.systemUriString | Returns 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.viewParameters | Returns the view parameters as a hash. |
ezpublish.viewParametersString | Returns the view parameters as a string. |
ezpublish.siteName | Returns the name of the current siteaccess. |