-
-
Save cuchac/e2042f8b3e723e0a07bc to your computer and use it in GitHub Desktop.
Shows all Smarty variables in tree-view directly in console. Always available and easy to access
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{* Smarty *} | |
{capture name='_smarty_debug' assign=debug_output} | |
<script type="text/javascript"> | |
// <![CDATA[ | |
window.smarty ={}; | |
{if $assigned_vars != null} | |
{foreach $assigned_vars as $vars} | |
window.smarty['{$vars@key|escape:'javascript'}'] = {$vars|@json_encode nofilter}; | |
{/foreach} | |
{/if} | |
console.dir(window.smarty) | |
// ]]> | |
</script> | |
{/capture} | |
{$debug_output nofilter} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment