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

changing link color

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-18-2008, 03:45 AM
 
junaid junaid is offline
 

Advanced Member
  
Join Date: Dec 2003
Posts: 96
 

Default changing link color

Hi,
i have just installed BCSengineering mod for changing product sort order by bestsellers, most viewed etc.

i would like to change the the color of link when user in on that link i.e if user click sorty by best seller and when page loads its color or style changes but other link around it remain same.

tried to many conditions but couldnt do it.

would appreciate any help.
__________________
xcart 4.18 on linux
Reply With Quote
  #2  
Old 10-18-2008, 08:11 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: changing link color

This is defined in your stylesheet (skin1.css by default, but yours may be different). Look at your "A:links" ("A:link" is the default for every link on your site) and the corresponding "hovers", "visiteds", and "actives".

There may (probably will) be several different ones, and you need to find the one that applies to the link you are trying to change elsewhere in stylesheet. In the template this will be defined as a "class".

The default navigation.tpl calls the "NavigationCellSel" and "NavigationCellWide" class links, but yours may vary. Again, check the template for the exact area you are working in. It sounds like the color you want to change (or add) is probably "active".
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #3  
Old 10-19-2008, 08:29 PM
 
junaid junaid is offline
 

Advanced Member
  
Join Date: Dec 2003
Posts: 96
 

Default Re: changing link color

thanks JWait.
i had seenitin navigation.tpl and i need something of that sort.

i dont want to use visited, or hovers as i want those links appear in one color whether visited or not and one which is active to other.
link:active doesnt work on this one and i dont think it can be controlled via css.
i need to change the class of link when its page is active.

i.e like on navigation.tpl if user is on page 2 , # 2 is highlighted and other numbers remain the same.
__________________
xcart 4.18 on linux
Reply With Quote
  #4  
Old 10-19-2008, 08:52 PM
 
Thedae2k Thedae2k is offline
 

eXpert
  
Join Date: Jan 2004
Posts: 288
 

Default Re: changing link color

change the style in the href of the link.

<a href="xyz.php" style="color#000000">whatever your text is for the link</a>
__________________
X-Cart Pro 4.1.9
PHP5.2.5
MySQL 5.0.54
IIS/Apache/NGINX Webservers
Reply With Quote
  #5  
Old 10-20-2008, 12:46 AM
 
junaid junaid is offline
 

Advanced Member
  
Join Date: Dec 2003
Posts: 96
 

Default Re: changing link color

Quote:
Originally Posted by Thedae2k
change the style in the href of the link.

<a href="xyz.php" style="color#000000">whatever your text is for the link</a>

that would be link color i guess, but what when it is clicked and we are on that page.
__________________
xcart 4.18 on linux
Reply With Quote
  #6  
Old 10-20-2008, 04:20 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: changing link color

Can you provide a link to a page on your site that has what you are talking about? If not can you provide a snippet of the code that you think is where you need the change?
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #7  
Old 10-20-2008, 09:23 PM
 
Thedae2k Thedae2k is offline
 

eXpert
  
Join Date: Jan 2004
Posts: 288
 

Default Re: changing link color

yeah what he said...jusy kidding!
__________________
X-Cart Pro 4.1.9
PHP5.2.5
MySQL 5.0.54
IIS/Apache/NGINX Webservers
Reply With Quote
  #8  
Old 10-22-2008, 12:34 AM
 
junaid junaid is offline
 

Advanced Member
  
Join Date: Dec 2003
Posts: 96
 

Default Re: changing link color

Quote:
Originally Posted by JWait
Can you provide a link to a page on your site that has what you are talking about? If not can you provide a snippet of the code that you think is where you need the change?
here is the code:
------------------
<div id="sort">{if $url eq '' && $navigation_script ne ''}{assign var="url" value=$navigation_script|cat:"&"}{/if}<br>
Sort Products By: {foreach from=$sort_fields key=name item=field} <a href="home.php?cat={$cat}&sort={$name}">{$field}</a>
|{/foreach}</div>

--------

sort fields = new | best sellers first | price low to high | price high to low | most viewed |


what i want is when user is on New it is highlighted and others are in black font color.
when user clicks best sellers first and page loads best seller link is highlighted other links remain black.

i hope i am able to clear you guys now.
thanks for your time.
__________________
xcart 4.18 on linux
Reply With Quote
  #9  
Old 10-22-2008, 03:58 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: changing link color

Look in your stylesheet (either skin1.css or skin_c.css depending on if you have one of x-carts custom skins) and find the class "sort". Under the closing "}" add

A.sort:active {
COLOR: #909090;
TEXT-DECORATION: none;
}

changing #909090 to whatever color you want the "highlight" to be.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #10  
Old 10-28-2008, 10:44 AM
 
junaid junaid is offline
 

Advanced Member
  
Join Date: Dec 2003
Posts: 96
 

Default Re: changing link color

Quote:
Originally Posted by JWait
Look in your stylesheet (either skin1.css or skin_c.css depending on if you have one of x-carts custom skins) and find the class "sort". Under the closing "}" add

A.sort:active {
COLOR: #909090;
TEXT-DECORATION: none;
}

changing #909090 to whatever color you want the "highlight" to be.
thanks for your reply.
actually this didnt worked, reason seems above work on plain html page not on dynamic page.
something of navigation.tpl type needs to be done when on click a class is assigned to the link active like page numbers in navigation.tpl.
__________________
xcart 4.18 on 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 03:28 PM.

   

 
X-Cart forums © 2001-2020