Involver Developer Network : tablerow
This page last changed on Sep 30, 2011 by kristin.bradley@involver.com.
Creating Tables in SMLSML can create table rows and cells for you using the tablerow loop. The tablerow loop functions exactly like a for loop except that the outputs are built into a dynamically generated table instead of a list of item. It is ideal for displaying data sets and the tables generated can be styled with CSS. The number of columns and the total number of items in the table are controlled by attributes. Basic Configuration<table> {% tablerow item in items cols: 3 limit: 12 %} {{ item.variable }} {% endtablerow %} </table> Attributes
Variables
Advanced code SampleYou can use if logic and the position variables to apply unique styles or customize content outputs for the first column (for instance). <table> {% tablerow item in items cols: 3 %} {% if tablerowloop.col_first %} First column: {{ item.variable }} {% else %} Different column: {{ item.variable }} {% endif %} {% endtablerow %} </table> |
![]() |
Document generated by Confluence on Feb 12, 2013 09:09 |