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

Cat. Icon as Background Instead of Image

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-06-2006, 06:38 PM
  girlsbits's Avatar 
girlsbits girlsbits is offline
 

Advanced Member
  
Join Date: May 2006
Posts: 77
 

Default Cat. Icon as Background Instead of Image

Howdy!

Is is possible to cut some code out of the subcategories.tpl and put it into the category description in admin? Reason being I would like to use large (520x320px) images as root category icons but don't want to use up screen real-estate and thought I'd display the category icon as a background image for the subcategory listing and number of products within those subcageories.

Here is the code I'm assuming needs changing, along with some {if} statements. I run into problems when I try to reference the call to the cat_icon URL in the background image URL.

Code:
<TD valign="top" rowspan="{count value=$subcategories print="Y"}">[img]{if $current_category.icon_url}{$current_category.icon_url}{else}{$xcart_web_dir}/icon.php?categoryid={$cat}{/if}[/img]</TD>

If all else fails I could always insert individual statements for each category, there aren't that many, and upload the icons to the skin1/images folder.

All help gratefully received.
__________________
X-Cart Gold | v 4.0.18 | Unix | php 4.3 | phpMyAdmin 2.8.0.3 |
Reply With Quote
  #2  
Old 08-07-2006, 12:29 AM
 
ecommerce ecommerce is offline
 

eXpert
  
Join Date: Jul 2006
Posts: 267
 

Default

I think i can be done. When in the admin section , in the text box where you add the description of the category.

include html already formated the way you want it to look.

This html can be a cell with the background picture and then your description on top.

done.

let me know if it worked .
__________________
X-Cart 4.0.18 DBest
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 10:58 AM.

   

 
X-Cart forums © 2001-2020