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

Change specific category font color

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-17-2009, 12:46 PM
 
BodyBalance BodyBalance is offline
 

Advanced Member
  
Join Date: Apr 2008
Posts: 44
 

Default Change specific category font color

Hello,

I have searched the forum but can't seem to locate what I am looking for.

I want a specific category on my left navigation to have a different link color then the rest. Is this possible?

For example, category 4 should have a red font instead of the default white font.

Can anyone point me in the right direction here?

Thanks,
David
__________________
Version 4.1.9
Reply With Quote
  #2  
Old 02-18-2009, 01:31 AM
  Victor D's Avatar 
Victor D Victor D is offline
 

X-Adept
  
Join Date: Aug 2008
Posts: 643
 

Default Re: Change specific category font color

In your skin1/customer/categories.tpl
find
Code:
{foreach from=$categories item=c} <font class="CategoriesList"><a href="home.php?cat={$c.categoryid}" class="VertMenuItems">{$c.category}</a></font><br /> {/foreach}
and replace with
Code:
{foreach from=$categories item=c} <font class="CategoriesList"><a href="home.php?cat={$c.categoryid}" class="VertMenuItems" {if $c.categoryid eq 4}style="color:#ff6ae0"{/if}>{$c.category}</a></font><br /> {/foreach}
Insert desired category number and color istead of 4 and #ff6ae0
__________________
Regards,
Victor Dubiniuk

X-Cart Skins Store
- twenty two different skins for 4.1.x and 4.2.x;
- 4.3.x compatible versions are available;
- refresh you store now!

Smart menu X-Cart add-on for 4.1.8 - 4.3.x
Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x
Reply With Quote
  #3  
Old 02-18-2009, 08:45 AM
 
BodyBalance BodyBalance is offline
 

Advanced Member
  
Join Date: Apr 2008
Posts: 44
 

Default Re: Change specific category font color

Thank you very much Victor. That works great.

Would you happen to know how to change the colors of the other navigation links. For example the links that end in "../pages.php?pageid=71"
__________________
Version 4.1.9
Reply With Quote
  #4  
Old 02-18-2009, 10:07 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: Change specific category font color

those are controlled by the class .VertMenuItems

Just change the color in the css file.
__________________
xcart 5.1.2
Reply With Quote
  #5  
Old 02-18-2009, 11:39 AM
 
BodyBalance BodyBalance is offline
 

Advanced Member
  
Join Date: Apr 2008
Posts: 44
 

Default Re: Change specific category font color

I figured out how to change all of them. I just need to change one color of one of the links.

::EDIT::

I figured out what I needed to change. In skin1/pages_menu.tpl I simply added {if $pages_menu[pg].pageid eq 81}style="color:red"{/if} after class="VertMenuItems".
__________________
Version 4.1.9
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 06:27 AM.

   

 
X-Cart forums © 2001-2020