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)
-   -   Editing menu.tpl. (https://forum.x-cart.com/showthread.php?t=4632)

john80y 10-05-2003 10:03 AM

Editing menu.tpl.
 
My template looks like this
Code:

<TABLE border=0 cellPadding=5 cellSpacing=0 width="100%">
<TR>
<TD class=VertMenuTitle height=26>{$link_begin}[img]{$ImagesDir}/{$dingbats}[/img]{$link_end}</TD>
{if $link_href}
<TD class=VertMenuTitle height=26 valign=center width=80%><font class=VertMenuTitle>{$menu_title}</font></TD>
{else}
<TD class=VertMenuTitle 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>



The template uses $menu_content to show what is displayed... Where can I edit $menu_content ????

groovico 10-05-2003 10:58 AM

you pass it during the include like

{include template.tpl menu_content="my menu is here"}

That template will then have $menu_content allocated to it internally

john80y 10-05-2003 12:33 PM

lol I still don't get it.

groovico 10-05-2003 12:36 PM

Look in your home tpl.

Notice all the includes like?

{include template.tpl}

Well if you put

{include template.tpl menu_content="my menu is here"}

your passing a paramater called menu_content to the sub template, in your case menu.tpl, in menu tpl you'll see {$menu_content} this will be replaced with whatever you passed in the include statement


All times are GMT -8. The time now is 04:31 PM.

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