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

Menu background image

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-22-2003, 01:18 PM
 
bberline bberline is offline
 

Member
  
Join Date: Jul 2003
Posts: 12
 

Default Menu background image

I have been trying for hours to add a menu background image to the section title "Categories". Is there a simple HTML snippet I can add to make this work properly. I plan on incorporating similar background images to the other sections as well. Any guidance is appreciated!

Here is the current code from categories.tpl x-cart 3.4.3:
Code:
{* $Id: categories.tpl,v 1.18 2003/02/25 08:58:46 olga Exp $ *} {capture name=menu} {if $config.General.root_categories eq "Y"} {section name=cat_num loop=$categories} <font class=CategoriesList>{ $categories[cat_num].category_name|escape }</font> {/section} {else} {section name=cat_num loop=$subcategories} <font class=CategoriesList>{ $subcategories[cat_num].category_name|escape }</font> {/section} {/if} {/capture} {include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu }
Reply With Quote
  #2  
Old 07-22-2003, 02:14 PM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

you should add the background image to the menu.tpl file or create a table around the code you pasted and set the background in that
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #3  
Old 07-22-2003, 02:24 PM
 
bberline bberline is offline
 

Member
  
Join Date: Jul 2003
Posts: 12
 

Default

Quote:
Originally Posted by shan
you should add the background image to the menu.tpl file or create a table around the code you pasted and set the background in that

Thanks shan! Could you give me an example of how the code should look in the menu.tpl? I'm confused how the menus work
Reply With Quote
  #4  
Old 07-22-2003, 02:29 PM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

menu.tpl works the same as dialog.tlp

the file is re-used on all menus and wraps around the code you see for individual menu eg help, news etc
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #5  
Old 07-22-2003, 02:44 PM
 
bberline bberline is offline
 

Member
  
Join Date: Jul 2003
Posts: 12
 

Default

Awesome. Thanks again!!
Reply With Quote
  #6  
Old 07-23-2003, 10:00 PM
 
bberline bberline is offline
 

Member
  
Join Date: Jul 2003
Posts: 12
 

Default

For anyone who is interested, here is the modified code (for menu.tpl):

Code:
<TABLE border=0 cellPadding=5 cellSpacing=0 width="100%"> <TR> {if $link_href} <TD class=VertMenuTitle background="/shop/skin1/images/tabs.gif" height=26 valign=center width=80%><font class=VertMenuTitle>{$menu_title}</font></TD> {else} <TD class=VertMenuTitle background="/shop/skin1/images/tabs.gif" height=26 valign=center width=80%><font class=VertMenuBoxNewsTitle>{$menu_title}</font></TD> {/if} </TR> <TR> <TD colspan="2" class=VertMenuBox>{$menu_content} </TD></TR> </TABLE>
Reply With Quote
  #7  
Old 07-24-2003, 05:41 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

The code you gave there would cause problems when going to https

call the images like this instead {$ImagesDir}/image.jpg

Code:
<TABLE border=0 cellPadding=5 cellSpacing=0 width="100%"> <TR> {if $link_href} <TD class=VertMenuTitle background="{$ImagesDir}/tabs.gif" height=26 valign=center width=80%><font class=VertMenuTitle>{$menu_title}</font></TD> {else} <TD class=VertMenuTitle background="{$ImagesDir}/tabs.gif" height=26 valign=center width=80%><font class=VertMenuBoxNewsTitle>{$menu_title}</font></TD> {/if} </TR> <TR> <TD colspan="2" class=VertMenuBox>{$menu_content} </TD></TR> </TABLE>
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #8  
Old 07-25-2003, 12:15 AM
  supanewb's Avatar 
supanewb supanewb is offline
 

Advanced Member
  
Join Date: Jul 2003
Location: Australia
Posts: 51
 

Default

WOW just tried this it works great!

My orange xcart is slowly disapearing bit by bit.

thanks
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 02:17 AM.

   

 
X-Cart forums © 2001-2020