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
  #11  
Old 05-24-2010, 08:27 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Highlight current page in speedbar

{if $current_category.categoryid eq "xxx" || $current_category.parentid eq "xxx"} class="current"{/if}
Not sure on top of my head if it's "parent", "parentid", or "paren_category"
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following user thanks cflsystems for this useful post:
FTI (05-24-2010)
  #12  
Old 05-24-2010, 11:04 AM
  FTI's Avatar 
FTI FTI is offline
 

Senior Member
  
Join Date: Oct 2009
Location: Plovdiv, Bulgaria
Posts: 153
 

Default Re: Highlight current page in speedbar

Thanks, again Steve. This was extremely helpful, is there any way this to be done for the sub-sub categories without writing a whole bunch of numbers?

Take a look
__________________
Version 4.2.3
X-Cart Gold

Version 4.3.1
X-Cart Gold
Reply With Quote
  #13  
Old 05-24-2010, 12:49 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Highlight current page in speedbar

Not sure but there is probably a way
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #14  
Old 05-24-2010, 12:59 PM
  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 $current_category.categoryid_path|regex_replace:" /\/[0-9\/]*/":""}class="current"{/if}

This should work
__________________
xcart 5.1.2
Reply With Quote
  #15  
Old 05-24-2010, 02:38 PM
  FTI's Avatar 
FTI FTI is offline
 

Senior Member
  
Join Date: Oct 2009
Location: Plovdiv, Bulgaria
Posts: 153
 

Default Re: Highlight current page in speedbar

Thanks Ash, where to put the category ID?
__________________
Version 4.2.3
X-Cart Gold

Version 4.3.1
X-Cart Gold
Reply With Quote
  #16  
Old 05-24-2010, 05:09 PM
  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 $current_category.categoryid_path|regex_replace:" /\/[0-9\/]*/":"" eq "259"}class="current"{/if}
__________________
xcart 5.1.2
Reply With Quote

The following user thanks ARW VISIONS for this useful post:
FTI (05-30-2010)
  #17  
Old 05-30-2010, 07:57 AM
  FTI's Avatar 
FTI FTI is offline
 

Senior Member
  
Join Date: Oct 2009
Location: Plovdiv, Bulgaria
Posts: 153
 

Default Re: Highlight current page in speedbar

Thaht did a perfect job. Ash, you are awesome. You and Steve, figured out the whole thing for me. Thanks guys!
__________________
Version 4.2.3
X-Cart Gold

Version 4.3.1
X-Cart Gold
Reply With Quote

The following user thanks FTI for this useful post:
cflsystems (05-30-2010)
  #18  
Old 05-30-2010, 10:55 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

no problem, glad I could help.
__________________
xcart 5.1.2
Reply With Quote
  #19  
Old 06-06-2010, 03:25 PM
 
Ajay Ajay is offline
 

Advanced Member
  
Join Date: Jul 2005
Posts: 50
 

Default Re: Highlight current page in speedbar

I want to remove the link on the tab, when same page is being viewed. So I made this change to skin1/customer/head.tpl . This is in 4.2.x
Quote:
<div class="tabs">
<ul>
{foreach from=$speed_bar item=sb}
{if $smarty.server.REQUEST_URI|replace:"/shop/":"" eq $sb.link }
<li class="current" >{$sb.title}</li>
{else}
<li><a href="{$sb.link|amp}">{$sb.title}</a></li>
{/if}
{/foreach}
</ul>
</div>

And then you can change the color of .current class as you wish
__________________
Xcart Pro version 4.4.3
Reply With Quote

The following user thanks Ajay for this useful post:
gb2world (11-10-2010)
  #20  
Old 06-28-2011, 02:59 AM
  believein's Avatar 
believein believein is offline
 

Advanced Member
  
Join Date: May 2011
Posts: 33
 

Default Re: Highlight current page in speedbar

Is there a way of doing this to highlight using the page Id for static pages?
__________________
Latest X-Cart project: www.rawlisa.co.uk ≈ Designed & developed by Believe in╝
X-Cart Gold v4.4.3
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 02:06 AM.

   

 
X-Cart forums © 2001-2020