Display template data

Details

This page shows version 4.x. The current version can be found here.

The available template context varies depending on the template source. Usually, the complete data can be accessed via $this->….

You can dump all available template data to see what’s there:

<?php $this->dumpTemplateVars() ?>

This statement uses the Symfony VarDumper component to display the data. In debug mode, the output will therefore be redirected to the Symfony Debug Toolbar.

Note

If you use template inheritance, the template data is only displayed in debug mode or if the statement is enclosed between $this->block(…) and $this->endblock() statements.