| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
quick help with {if} comparison | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() 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! |
|||||||
#2
|
|||||||||
|
|||||||||
![]() 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!
__________________
X-cart Featured Products Manager from http://www.firetanksoftware.com - Put your products where you want, how you want. |
|||||||||
#3
|
|||||||
|
|||||||
![]() That did it, thank you so much! Exactly how I wanted it.
I better start reading up on Smarty a little more. |
|||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|