Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

{{ dump(page.foo) }}

Started by Muut Archive 11 years ago · 6 replies · 452 views
11 years ago

What's the magic incantation to get this to work? All I get from this is whitespace (with or without the <pre> tags).

-- sw

11 years ago

Should show up in the message tab of the debugger. So you have to turn the debugger on first.

11 years ago

Is there any way to put the debugger javascript junk at the beginning of the {{ assets.js() }} list? If I turn on the debugger, my menu gets messed up. I have a jQuery $(document).ready() function that sets up the menu.

-- sw

11 years ago

I did what you suggested and I still don't see it. I have
{{ dump(page.url) }} in my template (yeah, I know I don't need dump with the .url attribute). No mention of it in the message tab or the twig tab.

11 years ago

make sure it's inside the {% block %},{% endblock %} tags

11 years ago

This is what I have in my template:

TWIG
{% block foo %}
     {{ dump(page) }}
{% endblock foo %}

and this is what I see in Messages:

JS
Environment Name: localhost
array:2 [ 0 => "user://config" 1 => "system/config" ]
Check configuration timestamps from all configuration files.
Configuration checksum matches, using cached version.

Where's the page dump?

-- sw

11 years ago

Is that foo block actually rendered? put an <h1>Foo Block</h1> in it to ensure that is displayed.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1330 9 years ago
Archive · by Muut Archive, 9 years ago
2 922 9 years ago
Archive · by Muut Archive, 9 years ago
2 4052 9 years ago
Archive · by Muut Archive, 9 years ago
1 2930 9 years ago
Archive · by Muut Archive, 9 years ago
3 1109 9 years ago