[% BLOCK tree_table_headfoot %]
+[% SET cell = type == 'head' ? 'th' : 'td' %]
<tr>
- <th>mode</th>
- <th>file</th>
- <th>actions</th>
+ <[% cell %]>mode</[% cell %]>
+ <[% cell %]>file</[% cell %]>
+ <[% cell %]>actions</[% cell %]>
</tr>
[% END %]
<table class='tree listing'>
- <thead>
- [% PROCESS tree_table_headfoot %]
- </thead>
- <tfoot>
- [% PROCESS tree_table_headfoot %]
- </tfoot>
+ <thead>[% PROCESS tree_table_headfoot type = 'head' %]</thead>
+ <tfoot>[% PROCESS tree_table_headfoot type = 'foot' %]</tfoot>
<tbody>
[% FOREACH item IN tree_list %]