1 {capture name='_smarty_debug' assign=debug_output}
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
5 <title>Smarty Debug Console</title>
6 <style type="text/css">
8 body, h1, h2, td, th, p {
9 font-family: sans-serif;
20 background-color: #f0c040;
27 background-color: #9B410E;
32 border-top: 1px solid black;
54 font-family: monospace;
65 background-color: #eeeeee;
69 background-color: #fafafa;
77 #table_assigned_vars th {
81 #table_config_vars th {
89 <h1>Smarty Debug Console - {if isset($template_name)}{$template_name|debug_print_var}{else}Total Time {$execution_time|string_format:"%.5f"}{/if}</h1>
91 {if !empty($template_data)}
92 <h2>included templates & config files (load time in seconds)</h2>
95 {foreach $template_data as $template}
96 <font color=brown>{$template.name}</font>
97 <span class="exectime">
98 (compile {$template['compile_time']|string_format:"%.5f"}) (render {$template['render_time']|string_format:"%.5f"}) (cache {$template['cache_time']|string_format:"%.5f"})
105 <h2>assigned template variables</h2>
107 <table id="table_assigned_vars">
108 {foreach $assigned_vars as $vars}
109 <tr class="{if $vars@iteration % 2 eq 0}odd{else}even{/if}">
110 <th>${$vars@key|escape:'html'}</th>
111 <td>{$vars|debug_print_var}</td></tr>
115 <h2>assigned config file variables (outer template scope)</h2>
117 <table id="table_config_vars">
118 {foreach $config_vars as $vars}
119 <tr class="{if $vars@iteration % 2 eq 0}odd{else}even{/if}">
120 <th>{$vars@key|escape:'html'}</th>
121 <td>{$vars|debug_print_var}</td></tr>
128 <script type="text/javascript">
129 {$id = $template_name|default:''|md5}
130 _smarty_console = window.open("","console{$id}","width=680,height=600,resizable,scrollbars=yes");
131 _smarty_console.document.write("{$debug_output|escape:'javascript'}");
132 _smarty_console.document.close();