<table cellspacing="0" cellpadding="2" border="1">
{% if header %} 
    <tr bgcolor="#dddddd"> 
    {% for cell in header %} 
        <th>{{ cell }} <a href="/test/asc/{{forloop.counter0}}">A</a>|<a href="/test/desc/{{forloop.counter0}}">V</a></th> 
    {% endfor %} 
    <tr> 
{% endif %}

{% if table %} 
    {% for row in table %} 
    <tr align="left" valign="middle" bgcolor="{%cycle #ecf2fe,white%}"> 
        {% for cell in row %} 
        <td>
        <!-- link (for -p abs) doesn't seem to work
          {% if forloop.last %}<a href="file://{{cell}}">{{ cell }}</a>{% else %}{{ cell }}{% endif %}
        -->
        {{ cell }}
        </td> 
        {% endfor %} 
    <tr> 
    {% endfor %} 
{% endif %}

{% if footer %} 
    <tr align="left" valign="middle" bgcolor="#dddddd"> 
    {% for cell in footer %} 
        <td>{{ cell }}</td> 
    {% endfor %} 
    <tr> 
{% endif %}
</table>
