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)
-   -   Highlight current page in speedbar (https://forum.x-cart.com/showthread.php?t=53581)

ARW VISIONS 06-28-2011 04:33 AM

Re: Highlight current page in speedbar
 
NOt exactky sure what you want to accomplish. What do you mean highlight??

believein 06-28-2011 04:52 AM

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/

ARW VISIONS 06-28-2011 05:16 AM

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.

believein 06-28-2011 05:33 AM

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.

ARW VISIONS 06-28-2011 07:51 AM

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.

ARW VISIONS 06-28-2011 08:04 AM

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.

believein 06-28-2011 08:43 AM

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.

believein 06-28-2011 08:51 AM

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?

cflsystems 06-28-2011 09:12 AM

Re: Highlight current page in speedbar
 
You can use "main" and "section" for help pages

ARW VISIONS 06-28-2011 10:00 AM

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.


All times are GMT -8. The time now is 12:31 AM.

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