2 {* debug.tpl, last updated version 2.1.0 *}
4 {capture assign=debug_output}
5 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
6 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
8 <title>Smarty Debug Console</title>
10 <style type="text/css">
12 body, h1, h2, td, th, p {
13 font-family: sans-serif;
24 background-color: #f0c040;
31 background-color: #9B410E;
36 border-top: 1px solid black;
58 font-family: monospace;
69 background-color: #eeeeee;
73 background-color: #fafafa;
81 #table_assigned_vars th {
85 #table_config_vars th {
94 <h1>Smarty Debug Console</h1>
96 <h2>included templates & config files (load time in seconds)</h2>
99 {section name=templates loop=$_debug_tpls}
100 {section name=indent loop=$_debug_tpls[templates].depth} {/section}
101 <font color={if $_debug_tpls[templates].type eq "template"}brown{elseif $_debug_tpls[templates].type eq "insert"}black{else}green{/if}>
102 {$_debug_tpls[templates].filename|escape:html}</font>
103 {if isset($_debug_tpls[templates].exec_time)}
104 <span class="exectime">
105 ({$_debug_tpls[templates].exec_time|string_format:"%.5f"})
106 {if %templates.index% eq 0}(total){/if}
111 <p>no templates included</p>
115 <h2>assigned template variables</h2>
117 <table id="table_assigned_vars">
118 {section name=vars loop=$_debug_keys}
119 <tr class="{cycle values="odd,even"}">
120 <th>{ldelim}${$_debug_keys[vars]|escape:'html'}{rdelim}</th>
121 <td>{$_debug_vals[vars]|@debug_print_var}</td></tr>
123 <tr><td><p>no template variables assigned</p></td></tr>
127 <h2>assigned config file variables (outer template scope)</h2>
129 <table id="table_config_vars">
130 {section name=config_vars loop=$_debug_config_keys}
131 <tr class="{cycle values="odd,even"}">
132 <th>{ldelim}#{$_debug_config_keys[config_vars]|escape:'html'}#{rdelim}</th>
133 <td>{$_debug_config_vals[config_vars]|@debug_print_var}</td></tr>
135 <tr><td><p>no config vars assigned</p></td></tr>
141 {if isset($_smarty_debug_output) and $_smarty_debug_output eq "html"}
144 <script type="text/javascript">
146 if ( self.name == '' ) {ldelim}
147 var title = 'Console';
150 var title = 'Console_' + self.name;
152 _smarty_console = window.open("",title.value,"width=680,height=600,resizable,scrollbars=yes");
153 _smarty_console.document.write('{$debug_output|escape:'javascript'}');
154 _smarty_console.document.close();