View Single Post
  #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