Re: section problem
| From: | Andr� Rabold | Date: | Wed, 19 Feb 2003 14:44:42 +0000 |
| Subject: | Re: section problem | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-7880@lists.php.net to get a copy of this message | ||
Search the documentation for Section syntax.
If I remember correctly you can use this
{if !$selSort[smarty.section.sort.index_next]} blaaah {/if}
perhaps this also works:
{if !$selSort[sort.index_next]} blaaah {/if}
have fun,
André
"Robin Ericsson" <robin.ericsson@profecta.se> schrieb im Newsbeitrag
news:1045665670.472.74.camel@pulver.localhost.nu...
> Hi,
>
> I have to following
>
> $smarty->assign("selSort", array(1 => 1, 2 => 3));
>
> {section name=sort start=1 loop=5}
> {/section}
>
> Inside the loop I have
>
> {if $selSort[sort] == 3} bla {/if}
>
> but I also need to do this, which I'm not really into how I should be
> doing:
> if {!$selSort[sort+1]} blaaaah {/if}
>
> sort+1 renders me an unknown token error.
>
>
>
> best regards
> Robin
>
>