RE: Smarty and speed

From: Date: Fri, 07 Dec 2001 07:51:29 +0000
Subject: RE: Smarty and speed
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-2185@lists.php.net to get a copy of this message
Hi Rod, I do actually agree with your email - most designers I know are definitely not coders, let alone programmers - which doesn't bother me, as I do al my own HTML and they just do the graphics, but I can understand your position. At 08:03 PM 12/6/01 -0500, you wrote:
{section name=sec1 loop=$links step=4} <tr height=35 bgcolor="{if %sec1.rownum% is even}#cccccc{else}#ffffff{/if}">
        <td align=center width=25%><a href="{$links[sec1]}">{$makes[sec1]}</a></td>
        <td align=center width=25%><a href="{$links[sec1+1]}">{$makes[sec1+1]|default:"&nbsp"}</a></td>
        <td align=center width=25%><a href="{$links[sec1+2]}">{$makes[sec1+2]|default:"&nbsp"}</a></td>
        <td align=center width=25%><a href="{$links[sec1+3]}">{$makes[sec1+3]|default:"&nbsp"}</a></td>
</tr> {/section}
If your designers don't mind relinquishing a slight bit of control (currently the link will have to be generated in the PHP script) use my table extension to Smarty to do this - <http://mapledesign.co.uk/coding/smarty_table.php>. The examples should show you all you need to know. And when Andrei gets round to implementing it, you'll be able to put the contents of the table cell between two {table} {/table} tags, thus giving back the control which the designers currently lose. HTH, Peter. -- Maple Design - http://www.mapledesign.co.uk

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