![]() |
quick help with {if} comparison
I want to make a {if} statement that checks if the product listed is the last (depending how many I have set to be displayed per page in the options).
So something like: {if the product is not the last in the page} <hr size=1 noshade width=100% align=left> {/if} Else then nothing, so that there isn't a horizontal line under the last item on the page, makes it all look a lot cleaner. Any and all help is appreciated! |
You'd need to know the loop index variable (see the 'name=' part of .
For example, if the index was "product" then you would use the following code: {if %product.last% ne "true"} ... code ... {/if} I'm getting the info from this page: http://smarty.php.net/manual/en/section.property.last.php I hope this helps! |
That did it, thank you so much! Exactly how I wanted it.
I better start reading up on Smarty a little more. |
All times are GMT -8. The time now is 03:06 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.