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

How to replace Categories.tpl links with image buttons?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-18-2003, 04:14 AM
 
rohit rohit is offline
 

Advanced Member
  
Join Date: Apr 2003
Posts: 36
 

Default How to replace Categories.tpl links with image buttons?

Hi,

I want to replace the text links as created by categories.tpl file with the respective buttons. How should i do that? see http://www.templatearena.com/xcart/customer

best regards
__________________
Rohit Sharma
Reply With Quote
  #2  
Old 04-18-2003, 11:42 PM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

Do it the same way as you would with normal html and work the smarty bits around it.

ie.

{* $Id: categories.tpl,v 1.16 2002/10/21 07:06:43 zorg Exp $ *}
<TABLE border=0 cellPadding=5 cellSpacing=0 width=100%>
<TR>
<TD class=VertMenuTitle height=26 width=26 valign=center>[img]{$ImagesDir}/dingbats_categorie.gif[/img]</TD>
<TD class=VertMenuTitle height=26 valign=center width="80%"><FONT class=VertMenuTitle>{$lng.lbl_categories}</FONT></TD>
</TR>
<tr><td colspan=2 nowrap>
{if $config.General.root_categories eq "Y"}
{section name=cat_num loop=$categories}
<font class=CategoriesList>[img]./yourimages/yourimage{ $categories[cat_num].categoryid }.gif[/img]</font>

{/section}
{else} {section name=cat_num loop=$subcategories}
<font class=CategoriesList>{ $subcategories[cat_num].category|escape }</font>

{/section}
{/if}
</td></tr>
</TABLE>

Where each image here is called yourimage{category number}.gif
__________________
ex x-cart guru
Reply With Quote
  #3  
Old 04-19-2003, 10:21 PM
 
rohit rohit is offline
 

Advanced Member
  
Join Date: Apr 2003
Posts: 36
 

Default RE:How to replace Categories.tpl links with image buttons?

I think i am getting you but not clearly. Heres what happening is that the button i just created for test i.e. buttonall.gif is being replaced by name buttonall251.gif..... when viewed finally and thus is not displaying.

This is what i have done :

[img]{$ImagesDir}/buttonall{ $categories[cat_num].categoryid }.gif[/img]

Is it correct?? If not then please tell me how to move?

thanks
__________________
Rohit Sharma
Reply With Quote
  #4  
Old 04-19-2003, 10:22 PM
 
rohit rohit is offline
 

Advanced Member
  
Join Date: Apr 2003
Posts: 36
 

Default RE:How to replace Categories.tpl links with image buttons?

I think i am getting you but not clearly. Heres what happening is that the button i just created for test i.e. buttonall.gif is being replaced by name buttonall251.gif..... when viewed finally and thus is not displaying.

Check: http://www.templatearena.com/xcart/customer

This is what i have done :

[img]{$ImagesDir}/buttonall{ $categories[cat_num].categoryid }.gif[/img]

Is it correct?? If not then please tell me how to move?

thanks
__________________
Rohit Sharma
Reply With Quote
  #5  
Old 04-19-2003, 11:03 PM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

And all you need to do is create an image for each category named (in your example) buttonall251.gif if the category id is 251
__________________
ex x-cart guru
Reply With Quote
  #6  
Old 04-20-2003, 04:46 AM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
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:42 PM.

   

 
X-Cart forums © 2001-2020