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

Add Icon to Category menu list

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-09-2012, 11:06 AM
 
scalemar scalemar is offline
 

Advanced Member
  
Join Date: Oct 2006
Posts: 35
 

Default Add Icon to Category menu list

Hello:

I want to add an Icon to the "category name" in the "category menu list" and include the 'ALT TEXT',

I did already this addition, WITH the fly-out menu activated in:
skin/common_files/modules/Flyout_Menus/Icons/fancy_subcategories.tpl

Now I want to do the same but WITHOUT the fly-out menu activated (It's so heavy to load).
Please let me know, how I can do this mod.
Thank you

MC
X-cart V4.4.5

http://www.digitalscalesusa.com/flyout_menus.png
__________________
x-cart V4.4.4
Smart Template
CDSEO
Unix
Reply With Quote
  #2  
Old 05-09-2012, 11:11 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Add Icon to Category menu list

The category icon is there but you need to modify the categories template to show it. You can take a look at how the code is in the flyout menus templates as an example of how to call the image there
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 05-09-2012, 12:11 PM
 
scalemar scalemar is offline
 

Advanced Member
  
Join Date: Oct 2006
Posts: 35
 

Default Re: Add Icon to Category menu list

Hi Steve:
1. I did the modification to the Flyout menu code as (underline is my Alt-text):
fancy_subcategories.tpl
{if $config.Flyout_Menus.icons_icons_in_categories gte $level+1 and $c.is_icon}
<img src="{$c.thumb_url|amp}" alt="{$c.category|escape}" width="{$c.thumb_x}" height="{$c.thumb_y}" />
{/if}

2. Without flyout menu,(categories.tpl) the code is:
{foreach from=$categories_menu_list item=c name=categories}
<li{interline name=categories}><a href="home.php?cat={$c.categoryid}" title="{$c.category|escape}">{$c.category|amp} </a></li>
{/foreach}

How I add the alt-text in accordance with the category name to the the icons?

Thank you

Moses
__________________
x-cart V4.4.4
Smart Template
CDSEO
Unix
Reply With Quote
  #4  
Old 05-09-2012, 12:21 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Add Icon to Category menu list

<a> tag doesn't have alt attribute, it has title attribute. Alt doesn't make sense for <a> tag as you have a text for the link, the alt attribute is for like image to show if the image cannot be shown for any reason
You can just copy the <img....> line to the code without flyout just before the <a> tag
__________________
Steve Stoyanov
CFLSystems.com
Web Development
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 11:35 AM.

   

 
X-Cart forums © 2001-2020