Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Is there a hook for a static page ID?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 06-28-2011, 03:07 AM
  believein's Avatar 
believein believein is offline
 

Advanced Member
  
Join Date: May 2011
Posts: 33
 

Default 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}
__________________
Latest X-Cart project: www.rawlisa.co.uk ≈ Designed & developed by Believe in╝
X-Cart Gold v4.4.3
Reply With Quote
  #2  
Old 06-28-2011, 03:12 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Is there a hook for a static page ID?

{if $page_data.pageid eq xx} class="current"{/if}
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 06-28-2011, 03:25 AM
  believein's Avatar 
believein believein is offline
 

Advanced Member
  
Join Date: May 2011
Posts: 33
 

Default 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?
__________________
Latest X-Cart project: www.rawlisa.co.uk ≈ Designed & developed by Believe in╝
X-Cart Gold v4.4.3
Reply With Quote
  #4  
Old 06-28-2011, 04:16 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Is there a hook for a static page ID?

Where are you using this code?
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #5  
Old 06-28-2011, 04:25 AM
  believein's Avatar 
believein believein is offline
 

Advanced Member
  
Join Date: May 2011
Posts: 33
 

Default Re: Is there a hook for a static page ID?

In tabs.tpl
__________________
Latest X-Cart project: www.rawlisa.co.uk ≈ Designed & developed by Believe in╝
X-Cart Gold v4.4.3
Reply With Quote
  #6  
Old 06-28-2011, 04:28 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default 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
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #7  
Old 06-28-2011, 12:44 PM
  cherie's Avatar 
cherie cherie is offline
 

X-Wizard
  
Join Date: May 2003
Location: USA
Posts: 1,534
 

Default 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}
__________________
redlimeweb.com
custom mods and design integration
4.7 linux
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 08:25 PM.

   

 
X-Cart forums © 2001-2020