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

Highlight current page in speedbar

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #21  
Old 06-28-2011, 04:33 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Highlight current page in speedbar

NOt exactky sure what you want to accomplish. What do you mean highlight??
__________________
xcart 5.1.2
Reply With Quote
  #22  
Old 06-28-2011, 04:52 AM
  believein's Avatar 
believein believein is offline
 

Advanced Member
  
Join Date: May 2011
Posts: 33
 

Default Re: Highlight current page in speedbar

Hi,

For example when on the FAQ's (static) page I'd like to make the link in the main nav have a light green background. Perhaps by adding a class to the link and using CSS to style its background.

Please look at my link. http://www.urlgone.com/0feb23/
__________________
Latest X-Cart project: www.rawlisa.co.uk ≈ Designed & developed by Believe in╝
X-Cart Gold v4.4.3
Reply With Quote
  #23  
Old 06-28-2011, 05:16 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Highlight current page in speedbar

ok gotcha. Yes there is a way.

{if $page_data.pageid = '2'}class="current"{/if}

replace the 2 with your faq page id class.
__________________
xcart 5.1.2
Reply With Quote
  #24  
Old 06-28-2011, 05:33 AM
  believein's Avatar 
believein believein is offline
 

Advanced Member
  
Join Date: May 2011
Posts: 33
 

Default Re: Highlight current page in speedbar

Thanks ARW VISIONS.

But that applies the class to all the links — as the if statement is true each time the loop that generates the menu is cycled through.

I would like just the link that applies to the current to have the class.
__________________
Latest X-Cart project: www.rawlisa.co.uk ≈ Designed & developed by Believe in╝
X-Cart Gold v4.4.3
Reply With Quote
  #25  
Old 06-28-2011, 07:51 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Highlight current page in speedbar

ok how about this....

{if $page_data.pageid eq '2' && $sb.title eq 'Test'}style="color:#cc0000"{/if}

replace with your data.
__________________
xcart 5.1.2
Reply With Quote
  #26  
Old 06-28-2011, 08:04 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Highlight current page in speedbar

{if $page_data.title eq $sb.title}style="color:#cc0000"{/if}
would work for all static pages as long as the page title and the speed bar title are the same.
__________________
xcart 5.1.2
Reply With Quote
  #27  
Old 06-28-2011, 08:43 AM
  believein's Avatar 
believein believein is offline
 

Advanced Member
  
Join Date: May 2011
Posts: 33
 

Default Re: Highlight current page in speedbar

Quote:
Originally Posted by ARW VISIONS
ok how about this....

{if $page_data.pageid eq '2' && $sb.title eq 'Test'}style="color:#cc0000"{/if}

replace with your data.

This seems to do the trick. Thank you very much.

Going to be a bugger if the client renames the pages though!

I thought this sort of functionality would be a standard feature for designers to latch onto.

Maybe Ill suggest as a feature request.

Thanks again.
__________________
Latest X-Cart project: www.rawlisa.co.uk ≈ Designed & developed by Believe in╝
X-Cart Gold v4.4.3
Reply With Quote
  #28  
Old 06-28-2011, 08:51 AM
  believein's Avatar 
believein believein is offline
 

Advanced Member
  
Join Date: May 2011
Posts: 33
 

Default Re: Highlight current page in speedbar

Ok - now I have to feature out the dynamic pages Eg. Contact

help.php?section=contactus

Do these page types have ID or titles?
__________________
Latest X-Cart project: www.rawlisa.co.uk ≈ Designed & developed by Believe in╝
X-Cart Gold v4.4.3
Reply With Quote
  #29  
Old 06-28-2011, 09:12 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Highlight current page in speedbar

You can use "main" and "section" for help pages
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #30  
Old 06-28-2011, 10:00 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Highlight current page in speedbar

{if $page_data.title eq $sb.title}style="color:#cc0000"{/if} if u do this, the as long as speed bar title and page title match its good.
__________________
xcart 5.1.2
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 09:56 PM.

   

 
X-Cart forums © 2001-2020