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)
-   -   Is there a hook for a static page ID? (https://forum.x-cart.com/showthread.php?t=59966)

believein 06-28-2011 03:07 AM

Is there a hook for a static page ID?
 
I want to indicate which static page you are on using css.

How would I output the class="current" on the links in tabs.tpl?

Something like...

Code:

{if $page eq "about" } class="current"{/if}

cflsystems 06-28-2011 03:12 AM

Re: Is there a hook for a static page ID?
 
{if $page_data.pageid eq xx} class="current"{/if}

believein 06-28-2011 03:25 AM

Re: Is there a hook for a static page ID?
 
Hmmm. Thanks for the speed response!

But this just outputs class="current" on each of the links - making them all current.

I need the class added only the link for the current page?

cflsystems 06-28-2011 04:16 AM

Re: Is there a hook for a static page ID?
 
Where are you using this code?

believein 06-28-2011 04:25 AM

Re: Is there a hook for a static page ID?
 
In tabs.tpl

cflsystems 06-28-2011 04:28 AM

Re: Is there a hook for a static page ID?
 
I meant post your code. tabs.tpl is for speed bar links not for static pages

cherie 06-28-2011 12:44 PM

Re: Is there a hook for a static page ID?
 
Is this what you're looking for?
Code:

{if $page_data.pageid eq $smarty.get.pageid} class="current"{/if}


All times are GMT -8. The time now is 01:36 PM.

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