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

2 or 3 Menu Styles

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-03-2005, 07:35 AM
  trams's Avatar 
trams trams is offline
 

Newbie
  
Join Date: Oct 2005
Posts: 3
 

Default 2 or 3 Menu Styles

ok... As it stands out of the box, when I change menu.tpl it changes all the menus in the system. Which makes perfect sense.

But I would like to have a few different menu styles to choose from. So far I have created menu2.tpl and menu3.tpl each with it's own styles I defined in the css document. Basically exact copies of menu.tpl just with the colors different.

Now I see where (lets use authbox.tpl as an example) it calls the variable referencing menu.tpl.

Code:
{* $Id: authbox.tpl,v 1.23 2004/06/24 09:53:29 max Exp $ *} {capture name=menu}

I am guessing I need to create new variables, like: menu2, menu3 so when I have

Code:
{* $Id: authbox.tpl,v 1.23 2004/06/24 09:53:29 max Exp $ *} {capture name=menu2}

It uses menu2.tpl instead of plain old menu.tpl

Problem is, I can not find where the variable "menu" is being defined so that I can add menu2 and menu3 underneath it. I hope all this makes some sort of sense I am not a programmer by any means. I am a designer that knows a little about code. If anyone has any insight it would be greatly appreciated. Thanks in advance.
Reply With Quote
  #2  
Old 10-03-2005, 07:53 AM
 
balinor balinor is offline
 

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

Default

Actually, no, you would change the bottom part of the capture, which is this piece of code (I'm using the one from categories.tpl as an example):

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

The top part stays the same no matter what, you just change the include part of the code I posted above.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 10-03-2005, 07:57 AM
  pauldodman's Avatar 
pauldodman pauldodman is offline
 

X-Guru
  
Join Date: Jul 2003
Location: Spain / UK
Posts: 3,062
 

Default

Hi,

I think what happens with the "capture name=menu" bit is that it is just creating a variable to call all the text that is between this bit and the end capture tag - {/capture}

The clue to what I think you are trying to do is on the last line of authbox.tpl

{ include file="menu.tpl" dingbats="dingbats_authentification.gif" menu_title=$lng.lbl_authentication menu_content=$smarty.capture.menu }

Just finishing off what I was explaining, you see the menu variable right at the end - this is then putting everything that was captured into the file menu.tpl

So what I think you need to do is create menu2.tpl and call that in the final include section.

You can do the same with dialog.tpl where that is called.

Hope that helps
__________________
Paul Dodman
e-business & m-commerce consultant
w: www.luminointernet.com
e: xcart@luminointernet.com

Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart.
Reply With Quote
  #4  
Old 10-03-2005, 11:04 AM
  trams's Avatar 
trams trams is offline
 

Newbie
  
Join Date: Oct 2005
Posts: 3
 

Default

Thanks!!! I feel stupid. I can't believe it was at the bottom. haha. Thanks guys!!
__________________
- trams
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 01:56 PM.

   

 
X-Cart forums © 2001-2020