View Single Post
  #5  
Old 07-11-2004, 09:07 PM
 
jin jin is offline
 

Member
  
Join Date: Jul 2004
Posts: 12
 

Default OK I did!

Hello.

I finally figured how this menu template(menu.tpl) and other menu tpls are built and tied up

For example, I'm going to create new help menu.
Firstly, I made totally new menu template (named mymenu.tpl).
Code look something like this:
Quote:
<div>
{if $link_href}
[img]{$ImagesDir}/myskin/{$menutitle}[/img]
{else}
[img]{$ImagesDir}/myskin/{$menutitle}[/img]</TD>
{/if}
</div>
<div class="mymenu">{$menu_content}</div>
(I don't like using tables, so I used div tag instead. And ignore the class in div, I just put it to have my menu suited in my design)
I created graphic for menu title in jpg(named mm_help.jpg) for $menutitle and put it in images folder(in my case:{$ImagesDir}/myskin/").

Secondally, I create new help menu template(named myhelp.tpl).
Quote:
{capture name=menu}
{$lng.lbl_recover_password}

{$lng.lbl_contact_us}

{$lng.lbl_privacy_statement}

{$lng.lbl_terms_n_conditions}

{include file="pages_menu.tpl"}


{/capture}
{ include file="mymenu.tpl" menutitle="mm_help.jpg" menu_title=$lng.lbl_help menu_content=$smarty.capture.menu link_href="help.php"}

I think you can delete this line "menu_title=$lng.lbl_help" because it's no longer used as menu title.

Finally, I put myhelp.tpl in home.tpl.
I don't know what's gonna happen when upgrade of x-cart comes.
But just for now, it works fine for me.
Reply With Quote