Display template data

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.

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.