X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Speedbar IF statement (https://forum.x-cart.com/showthread.php?t=45183)

abeight 01-29-2009 07:37 AM

Speedbar IF statement
 
I'm applying styles to my speedbar, but I want either the first or last button to have a different style than the others. Is there an IF statement that says "if this is the last link - do this"?

This is for 4.1.11

TIA! :)

PhilJ 01-29-2009 08:17 AM

Re: Speedbar IF statement
 
Within...
Code:


{section name=sb loop=$speed_bar}
...
{/section}

Use...
Code:

{if $smarty.section.sb.first} class="first_style"{/if}
And...
Code:


{if $smarty.section.sb.last} class="last_style"{/if}


abeight 01-29-2009 08:25 AM

Re: Speedbar IF statement
 
Thanks so much, Phil! :)


All times are GMT -8. The time now is 05:23 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.