I'm using the dump
function of the twig
.
But it shows the data "folded", like in here:
When I click the arrow, I may reveal the data by unfolding it, like in here:
Is there any way to tell the twig
or dump
to directly display the objects fully-unfolded.
You can do this with javascript (jQuery):
// Expand all dump levels of all sf-dumps on a page.
$("pre.sf-dump").each(function() {
$(this).find("a.sf-dump-toggle:gt(0)").each(function(i, a){
a.click();
});
})
This simulates the user clicking each dump toggle (excluding the first one with gt(0)
) of each sf-dump on a page.
Edit: I added an each() function to make the script work for any number of sf-dumps there might be on a page. Thanks to @Xavi
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With