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)
-   -   2 or 3 Menu Styles (https://forum.x-cart.com/showthread.php?t=17043)

trams 10-03-2005 07:35 AM

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.

balinor 10-03-2005 07:53 AM

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.

pauldodman 10-03-2005 07:57 AM

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

trams 10-03-2005 11:04 AM

Thanks!!! I feel stupid. I can't believe it was at the bottom. haha. Thanks guys!!


All times are GMT -8. The time now is 01:23 AM.

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