dump()

Dumps information about template variables. This function is very useful when building website templates to establish variable values, or when debugging template issues. 

Discovering available template variables

Not all templates are equal. Different controllers instantiate different template variables. The dump() function called with no arguments lists all objects available on your template - even those declared at runtime within your template. 

To output all available variables:

{{ dump() }}

Describing specific variables

You may supply any available variable to the dump() function to describe the object's properties and methods. 

{{ dump(page) }}

The dump()function works within:

  • Templates
  • Layouts
  • CMS Editable regions

Integrated documentation

We've integrated the dump() function with large parts of our documentation. You should be able to click on properties, methods and variables types to learn more about them.