Skip to the content
Documentation

Parameters injection in content views: old version (page ...

No ratings yet

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

Version 1 Next »

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

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

Example

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

Service configuration

 

 

  • No labels

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.