Changes between Version 1 and Version 2 of ColumnizeTag


Ignore:
Timestamp:
06/16/2006 09:12:18 AM (9 years ago)
Author:
coordt@…
Comment:

Added a better typical usage

Legend:

Unmodified
Added
Removed
Modified
  • ColumnizeTag

    v1 v2  
    1313
    1414'''cell_tags:''' is optional. The class name you want for the <td> tags goes here, otherwise. If you list several (e.g. cell1,cell2 ) it will loop through them ''within the row'' like {% cycle %}.
     15
     16== Typical Usage ==
     17Simple
     18{{{
     19<table border="0" cellspacing="5" cellpadding="5">
     20    {% for o in some_list %}
     21        {% columnize 3 %}
     22             <a href="{{ o.get_absolute_url }}">{{ o.name }}</a>
     23        {% endcolumnize %}
     24    {% endfor %}
     25</table>
     26}}}
     27
     28With row and cell classes
     29{{{
     30<table border="0" cellspacing="5" cellpadding="5">
     31    {% for o in some_list %}
     32        {% columnize 3 myrow mycell %}
     33             <a href="{{ o.get_absolute_url }}">{{ o.name }}</a>
     34        {% endcolumnize %}
     35    {% endfor %}
     36</table>
     37}}}
     38
     39With a cell class, but no row class
     40{{{
     41<table border="0" cellspacing="5" cellpadding="5">
     42    {% for o in some_list %}
     43        {% columnize 3 '' mycell %}
     44             <a href="{{ o.get_absolute_url }}">{{ o.name }}</a>
     45        {% endcolumnize %}
     46    {% endfor %}
     47</table>
     48}}}
     49
     50Alternating rows, and each cell/column is different
     51{{{
     52<table border="0" cellspacing="5" cellpadding="5">
     53    {% for o in some_list %}
     54        {% columnize 3 row1,row2 cell1,cell2,cell3 %}
     55             <a href="{{ o.get_absolute_url }}">{{ o.name }}</a>
     56        {% endcolumnize %}
     57    {% endfor %}
     58</table>
     59}}}
    1560
    1661== Code ==
Back to Top