Re: section step
| From: | Jason Sweat | Date: | Tue, 27 Nov 2001 17:04:44 +0000 |
| Subject: | Re: section step | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-2059@lists.php.net to get a copy of this message | ||
That is what Andrei's code that I referenced did. change the 4 to anything
you want in the template.
{if %sec1.index% is div by 4}
</tr>
<tr height=35 bgcolor="{if %sec1.iteration% is
even}#cccccc{else}#ffffff{/if}">
{/if}
----- Original Message -----
From: "Rod K" <rod@23net.net>
To: <smarty@lists.ispi.net>
Sent: Tuesday, November 27, 2001 10:44 AM
Subject: [smarty] Re: section step
> Nah. That's not a good idea. That puts it back on the PHP code and not
on
> the designer. In my mind, the designer should be able to change the
layout
> (i.e. number of columns) without involving the coder.
>
> -----Original Message-----
> From: Jason Sweat [mailto:sweatjejm@home.com]
> Sent: Tuesday, November 27, 2001 11:39 AM
> To: smarty@lists.ispi.net
> Subject: [smarty] Re: section step
>
>
> What Andrei Zmievski <andrei@ispi.net> replied for the <tr> structure +
>
> make and array like
> links[0][key1] = "href1";
> links[0][key2] = "desc1";
> links[1][key1] = "href2";
> links[1][key2] = "desc2";
>
> then use
> {section name=sec1 loop=$links}
> <td align=center width=25%><a
> href="{$links[sec1].key1}">{$links[sec1].key2}</a></td>
> {/section}
> ----- Original Message -----
> From: Rod K
> To: smarty@lists.ispi.net
> Sent: Tuesday, November 27, 2001 10:19 AM
>
> {section name=sec1 loop=$links step=4}
> <tr height=35 bgcolor="{if %sec1.iteration% 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[???]}">{$makes[???]}</a></td>
> <td align=center width=25%><a
> href="{$links[???]}">{$makes[???]}</a></td>
> <td align=center width=25%><a
> href="{$links[???]}">{$makes[???]}</a></td>
> </tr>
> {/section}
>
>
>
> ---
> You are currently subscribed to smarty as: rod@23net.net
> To unsubscribe send a blank email to $subst('Email.Unsub')
> Visit Smarty's homepage at
> http://www.phpinsider.com/php/code/Smarty/
>
>
>
>
> ---
> You are currently subscribed to smarty as: sweatjejm@home.com
> To unsubscribe send a blank email to $subst('Email.Unsub')
> Visit Smarty's homepage at
> http://www.phpinsider.com/php/code/Smarty/
>