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: documented the module layout

...

You can configure this by setting the ezpublish_legacy.<scope>.view_default_layout config key.

Note

Note that the <scope> is the previously defined value from the available scopes. For more details please refer to the scope configuration documentation.

Code Block
titleezpublish/config/ezpublish.yml
parameters:
    ezpublish_legacy.<scope>.view_default_layout: AcmeDemoBundle::my_layout.html.twig

...

Code Block
titlemy_layout.html.twig
<!DOCTYPE html>
<html>
<head>
    <!-- ... -->
</head>
<body>
    {block content}{# Content will be inserted here #}{endblock}
</body>
</html>

 

Module layout

The module layout can also be defined the same way as the base layout, by setting the ezpublish_legacy.<scope>.module_default_layout config key. This layout is used to handle "non content" related legacy requests.

Code Block
titleezpublish/config/ezpublish.yml
parameters:
    ezpublish_legacy.<scope>.module_default_layout: AcmeDemoBundle::my_module_layout.html.twig

Persistent variable

The persistent variable is a special variable in legacy templates that you can set in order to pass values from the content template to the pagelayout. This variable, among others, is accessible from the configured Twig pagelayout thanks to the helper ezpublish.legacy.

...