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

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

When the standard view provider is not able to select an appropriate template for a given content, the system fallbacks to the legacy kernel and delegates the view selection to itThis ensures that a content is always displayed and hence eases project migration from eZ Publish v4.x to v5.x

Pagelayout and main block

When falling back to the legacy kernel, the old content/view module is run to return the appropriate view for the given content. However, the pagelayout is not rendered as it needs to be still rendered by Twig in the Symfony part, for consistency. In this regard, the system uses the Decorator design pattern to include the generated view in your layout.

For this to work, you need to configure 2 things :

  1. Which template you want to use as a base template for legacy fallback
  2. The name of the block to use in your layout

Base layout for legacy fallback

You can configure this by setting the ezpublish_legacy.view.default_layout config key.

ezpublish/config/ezpublish.yml

This configuration is application global only for now.

 

Block name

Internally when rendering the view coming from the legacy kernel, a Twig template is created on the fly. This template extends the pagelayout you configured and includes the content inside a block. The name of this block is configurable as well (default is content).

ezpublish/config/ezpublish.yml
my_layout.html.twig

 

Assets and persistent variable

 

  • No labels