Re: [SMARTY] Int incr/decr on the fly

From: Date: Mon, 19 Jan 2004 13:38:19 +0000
Subject: Re: [SMARTY] Int incr/decr on the fly
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-10852@lists.php.net to get a copy of this message
Luc Saint-Elie ha scritto:
Hello I don't know if this is the correct solution (this is probably NOT the corerect qsolution) but I had the same problem for a protfolio display each image having to links one to the previous and one to the next. The variable $portfolio.id is the id of current image I use this (OK please don't laught you smarty gurus, this looks ugly but this works :-) ) <a href="{$smarty.server.PHP_SELF}?page=image&p={math equation="x - y" x=$portfolio.id y=1}"> <img src="images/flecheprevious.gif" alt="" name="imgprev" id="imgprev" width="20" height="20" border="0"> </a>
           And this
<a href="{$smarty.server.PHP_SELF}?page=image&p={math equation="x + y" x=$portfolio.id y=1}"> <img src="images/flechenext.gif" alt="" name="imgnext" id="imgnext" width="20" height="20" border="0"> </a>
           Luc
Hi Luc, Thank you for your answer, but this is not what I was searching.. I don't want to use a math tag. Anyway, thank you for your time. Luca

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