2

I'm trying to dump a list of available template tokens, and their contents. There's a command that's available in dev mode, but I haven't found it's documentation.

3

Stick {{ dump(_context) }} in a template file to print out all the available values.

{{ dump(_context|keys) }} Outputs the keys of the array without going through it recursively.

1
  • An addendum, the craft_kint plugin, github.com/mildlygeeky/craft_kint, lets you use {{ d{_context) }} and makes the output much friendlier. Collapsible, colorful, and the like.
    – ponies
    Feb 3 '17 at 0:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.