Formatting tables

From: Date: Mon, 28 Oct 2002 12:08:21 +0000
Subject: Formatting tables
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-6252@lists.php.net to get a copy of this message
How is it possible to extend smarty (prefilters ?) so that the following code for formatting tables is transformed at compile-time into a regular {section} (nested with if-s for row start and stop and another {section} for padding) ? Do you think this approach is right ? Thank you, Gilles {table name=thisitem loop=$myarray cols=3} {* all "section" args may be used *} {rowstart} <tr><td>left decoration col</td> {/rowstart} <td>Actual data cell</td> {padcell} <td>Padding cell</td> {/padcell} {dummycell} <td>This cell will never be displayed but is used by the template designer for padding the table to its right number of cols on the template file for accurate design.</td> {/dummycell} {rowstop} <td>right decoration col</td></tr> {/rowstop} {/table}

« previous php.smarty.general (#6252) next »