X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Menu background image (https://forum.x-cart.com/showthread.php?t=3690)

bberline 07-22-2003 01:18 PM

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 }


shan 07-22-2003 02:14 PM

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

bberline 07-22-2003 02:24 PM

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 :?

shan 07-22-2003 02:29 PM

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

bberline 07-22-2003 02:44 PM

Awesome. Thanks again!! :D

bberline 07-23-2003 10:00 PM

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>


shan 07-24-2003 05:41 AM

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>


supanewb 07-25-2003 12:15 AM

WOW just tried this it works great!

My orange xcart is slowly disapearing bit by bit.

thanks :D


All times are GMT -8. The time now is 10:55 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.