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

Graphic menu title

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-10-2004, 10:20 PM
 
jin jin is offline
 

Member
  
Join Date: Jul 2004
Posts: 12
 

Default Graphic menu title

Hi.
I'm newbie in here. Just started building site with x-cart a few weeks ago.
Could anyone help me to change menu title
from text to graphic?
Here is what I want to do:
http://www.powerxusa.com/x-cartforum/wish.gif


---------
v.3.5.9 Linux
Reply With Quote
  #2  
Old 07-11-2004, 04:35 AM
 
Wizard Wizard is offline
 

Advanced Member
  
Join Date: Jun 2004
Posts: 40
 

Default

Do you want this to be for the Category one only... or for all menus?

If you want to do it for all of the menus that display then it is a pretty easy mod... unfortunately I do not have time to post it right now but I will be back around later tonight and can throw it up here....

Let me know...
__________________
Mike

X-Cart 4.0.9 Gold (In Development)
No Live Site

Server version: Apache/1.3.28 (Unix) FrontPage/5.0.2.2510 mod_ssl/2.8.15 OpenSSL/0.9.7a PHP-CGI/0.1b
Reply With Quote
  #3  
Old 07-11-2004, 12:52 PM
 
jin jin is offline
 

Member
  
Join Date: Jul 2004
Posts: 12
 

Default Hi Wizard!

Hello Mike.
I would love to know how to do this for all menus.
But if I would like to have some menu has graphic menu title,
others don't later on, is your mod able to do this?
Reply With Quote
  #4  
Old 07-11-2004, 04:58 PM
 
Wizard Wizard is offline
 

Advanced Member
  
Join Date: Jun 2004
Posts: 40
 

Default

Well I threw together the mod this evening and tested it out and was unable to get it to work. It was a simple mod... and I am not understanding why it did not work... so I will have to go back to the drawing board...

All I did in the mod was comment out the following line:

Code:
<FONT class="VertMenuBoxNewsTitle">{$menu_title}</FONT>

and replace it with:

Code:
[img]{Imagesdir}/{$menu_title}.gif[/img]

So basically what it would do is for each header it would look for a graphical GIF file in the images directory with the same name as the TITLE of the box... so for authentication it would look in the images directory for authentication.gif ...

In theory this should work but when testing it I was unable to make it happen...

It was a quick simple hack to get what you wanted done... nothing fancy..

Ill try and work on this some more....
__________________
Mike

X-Cart 4.0.9 Gold (In Development)
No Live Site

Server version: Apache/1.3.28 (Unix) FrontPage/5.0.2.2510 mod_ssl/2.8.15 OpenSSL/0.9.7a PHP-CGI/0.1b
Reply With Quote
  #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
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 11:06 PM.

   

 
X-Cart forums © 2001-2020