General

  eZ Systems Website
  Editor documentation


  Developer documentation

  Back to the top

Skip to end of metadata
Go to start of metadata

Description

It is possible to dynamically inject variables in content view templates by listening to the  ezpublish.pre_content_view  event.

The event listener method receives an eZ\Publish\Core\MVC\Symfony\Event\PreContentViewEvent object

Example

The following example will inject foo and osTypes variables in all content view templates.

Service configuration

 

 

In this topic:

Related topics:

Content Rendering

Default view templates