Re: [SMARTY] Retardation : looping thru photo gallery
| From: | Tim Burden | Date: | Thu, 24 Oct 2002 20:54:35 +0000 |
| Subject: | Re: [SMARTY] Retardation : looping thru photo gallery | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-6236@lists.php.net to get a copy of this message | ||
Hmm. Thought math equations were expensive because of the eval. Why is there
no index_last and index_first to go with index_prev and index_next? Well,
whatever works for now. Thanks
----- Original Message -----
From: "Manfred 'dwerg' Stienstra" <manfred.stienstra@dwerg.net>
To: <smarty-general@lists.php.net>
Sent: Thursday, October 24, 2002 4:12 PM
Subject: Re: [SMARTY] Retardation : looping thru photo gallery
On Thursday 24 October 2002 21:58, Tim Burden wrote:
> Yeah I tried that. On a loop over six pics,
> {$smarty.section.pics.total-1} //no spaces
> Fatal error: Smarty plugin error: [in Photo_Gallery line 5]: unknown tag -
> '$smarty.section.pics.total-1'
>
> Whereas
> {$smarty.section.pics.total -1} //has spaces
> gives 6, which is still one too high.
{math equation="x-1" x=$smarty.section.pics.total}
Manfred
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php