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

Category tables ?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-05-2004, 02:24 AM
 
vg vg is offline
 

Member
  
Join Date: Jul 2004
Posts: 13
 

Default Category tables ?

Hi Guys,

With the menu items on the left side?

Is it possible to have different background for each menu item.

Like

Login = blue background

Category = red background

Help = yellow background

I don't really know what section to edit since the CSS file only has VertMenuBox and when you change that background it will change the whole thing.


Thanks again.
__________________
vg
xcart gold 3.5.x
rookie driver
Reply With Quote
  #2  
Old 12-05-2004, 05:16 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Since each menu uses the same style, we will need to create seperate styles for each menu. Let's use the Categories menu as an example:

1. In your skin1.css file, create a duplicate for each of the menu styles. Vertmenubox-categories for example. Set the background by adding this to the style:

Code:
background-image: url(images/yourimage.jpg);

2. Click on edit templates, and scroll down to where it says new file. Create a new file called menu-categories.tpl. Copy the contents of the menu.tpl file into this file. Change the style names to correspond to the new style names you just created.

3. In customer/categories.tpl, scroll down to the bottom of the screen and replace this:

Code:
{include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu }

with this:

Code:
{include file="menu-categories.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_categories menu_content=$smarty.capture.menu }

You will need to repeat this process for each of the menus you want to change. Have fun!
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 12-05-2004, 08:08 AM
 
vg vg is offline
 

Member
  
Join Date: Jul 2004
Posts: 13
 

Default

thanks!

your the best
__________________
vg
xcart gold 3.5.x
rookie driver
Reply With Quote
  #4  
Old 12-05-2004, 11:34 AM
  Zaja's Avatar 
Zaja Zaja is offline
 

X-Adept
  
Join Date: Mar 2004
Location: The Universe is my home
Posts: 420
 

Default

You can use Smarty "Cycle" function in menu.tpl, this makes it easy to alternate between two or more styles.
Just replace (menu.tpl):
Code:
<TD class="VertMenuTitle">
with this code:
Code:
<TD class="{cycle values="VertMenuTitle,VertMenuTitle2,VertMenuTitle3,VertMenuTitle4"}"

Then set up new styles definition in skin1.css:
Code:
.VertMenuTitle2 { BACKGROUND-COLOR: ##FF80C0; COLOR: #330000; FONT-WEIGHT: bold; } .VertMenuTitle3 { BACKGROUND-COLOR: #FFFF80; COLOR: #330000; FONT-WEIGHT: bold; } .VertMenuTitle4 { BACKGROUND-COLOR: #9FFFFF; COLOR: #330000; FONT-WEIGHT: bold; }
__________________
_/ _/ _/ _/ _/ _/ _/ _/ _/

7dana.com
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:24 AM.

   

 
X-Cart forums © 2001-2020