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

Add Menu with Links To Static Pages

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-02-2006, 10:33 AM
  Daedalus's Avatar 
Daedalus Daedalus is offline
 

Member
  
Join Date: Feb 2006
Location: California, USA
Posts: 20
 

Default Add Menu with Links To Static Pages

Forgive me if this has been answered a bazillion times. I've searched the forum and the manual and am able to only get 1/2 of where I need to be.

I would like to add a menu on the left side of the page between the category menu and the Special menu, call this menu "Information" and add links to static HTML pages in this menu.

So far, I've been able copy the Special menu, so that on the left side I now have a Category menu with 2 Special menus underneath.

In the new Special menu, I need to be able to first, get rid of the link to Gift Certificates and replace this with links to my static HTML pages.

And second, I need to be able to change the name of the menu to "Information".

Any help from those with more know-how than I will be greatly appreciated!
__________________
X-Cart version 4.0.18 (Unix)
Reply With Quote
  #2  
Old 03-03-2006, 01:33 AM
  pauldodman's Avatar 
pauldodman pauldodman is offline
 

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

Default

The skin1/help.tpl is the menu that will list your static pages automatically.
Why not use that? At the very least use that as the menu to copy your new one from as it will have the code in it.

Where you put the new menu is set in customer/home.tpl

The last capture line of the menu holds the menu title. Change the language label variable, or best off make a new label in Admin Languages and change the code in your menu to call this new variable.
__________________
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
  #3  
Old 03-03-2006, 05:25 PM
  Daedalus's Avatar 
Daedalus Daedalus is offline
 

Member
  
Join Date: Feb 2006
Location: California, USA
Posts: 20
 

Default

Thanks, with your help, I've almost been able to get this worked out.

So far, I have now copied the Help menu and have changed the links to point to my static HTML pages and have changed the link text by giving the links new labels as was suggested. So, this is all good.

My only sticking point now is that I can't seem to change the Help menu label to "Information". I've created a new label for information, called lbl_Information but when I substitute it for the help label, no text appears on top of the menu box.

Here is the orginal code:

{ include file="menu.tpl" dingbats="dingbats_help.gif" menu_title=$lng.lbl_help menu_content=$smarty.capture.menu link_href="help.php"}

Here is how I've modified it:

{ include file="menu.tpl" dingbats="dingbats_help.gif" menu_title=$lng.lbl_Information menu_content=$smarty.capture.menu link_href=""}
__________________
X-Cart version 4.0.18 (Unix)
Reply With Quote
  #4  
Old 03-04-2006, 04:45 AM
  pauldodman's Avatar 
pauldodman pauldodman is offline
 

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

Default

Maybe its the capital I, have you got a capital I in your admin languages to match?
__________________
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
  #5  
Old 03-04-2006, 05:13 AM
  Daedalus's Avatar 
Daedalus Daedalus is offline
 

Member
  
Join Date: Feb 2006
Location: California, USA
Posts: 20
 

Default

Doh! You are so right. I guess I'm not very good at crossing my T's and dotting my I's - literally. Thanks again!
__________________
X-Cart version 4.0.18 (Unix)
Reply With Quote
  #6  
Old 03-04-2006, 05:20 AM
  pauldodman's Avatar 
pauldodman pauldodman is offline
 

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

Default

Glad you got there in the end - and thanks for your PM. It is when people show such appreciation for the free help they receive that it makes it worthwhile. There are some people who just expect to get answers from the forum, they think that having spent money on the software that other users should spoon feed them answers by right - hence, as you say, so many unanswered posts!
__________________
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
  #7  
Old 03-06-2006, 03:16 PM
  Daedalus's Avatar 
Daedalus Daedalus is offline
 

Member
  
Join Date: Feb 2006
Location: California, USA
Posts: 20
 

Default

I appreciate all the help and guidance.

I also look forward to the day when I have enough knowledge and expertise to be a quality contributor to this message board and pay forward some of the help that I've received.
__________________
X-Cart version 4.0.18 (Unix)
Reply With Quote
  #8  
Old 03-07-2006, 06:21 PM
 
Touchy Touchy is offline
 

Advanced Member
  
Join Date: Feb 2005
Location: USA
Posts: 49
 

Default Menu error

Hey guys,

I tried to include this mod on my site.

But when I go to change the label name to call out something different I get the following error when my home page loads.


Fatal error: Smarty error: [in customer/info.tpl line 5]: syntax error: invalid attribute name: '=' (Smarty_Compiler.class.php, line 1524) in /home/mysite/public_html/mysite/Smarty-2.6.9/Smarty.class.php on line 1088


My code that works from original help.tpl copy

{* $Id: extrainfo.tpl,v 1.19 2004/06/04 12:52:38 svowl Exp $ *}
{capture name=menu}
Extra Info

{/capture}
{ include file="menu.tpl" dingbats="dingbats_help.gif" menu_title=$lng.lbl_help menu_content=$smarty.capture.menu link_href=""}



Changed code to change name callout

{* $Id: extrainfo.tpl,v 1.19 2004/06/04 12:52:38 svowl Exp $ *}
{capture name=menu}
Extra Info

{/capture}
{ include file="menu.tpl" dingbats="dingbats_help.gif" menu_title=$lng.lbl_extrainfo=$smarty.capture.menu link_href=""}



The only thing I changed was the label callout. Any ideas why this would happen as when I change it back everything works OK.
__________________
Thanks,

Version 4.0.17
Reply With Quote
  #9  
Old 03-07-2006, 10:57 PM
  pauldodman's Avatar 
pauldodman pauldodman is offline
 

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

Default

Well your coding doesn't make sense.

Have another look at what you have done...

Originally, the last line had these statements.

menu_title=$lng.lbl_help

and

menu_content=$smarty.capture.menu link_href=""

Now, your menu title is set to:
menu_title=$lng.lbl_extrainfo=$smarty.capture.menu link_href=""

So, I don't see why you have done this?
You seem to have merged a load of code together, removing altogether the reference to the menu_content.

You need to have those 2 statements in there - one to set up the title, and the other to set up the content.
__________________
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
  #10  
Old 03-08-2006, 07:06 AM
 
Touchy Touchy is offline
 

Advanced Member
  
Join Date: Feb 2005
Location: USA
Posts: 49
 

Default

I am such a dork,

I thought the label for help was:

$lng.lbl_help menu_content

And not

$lng.lbl_help

Got it now, code is not my strong point :oops:

Thanks
__________________
Thanks,

Version 4.0.17
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 12:00 AM.

   

 
X-Cart forums © 2001-2020