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)
-   -   Add Menu with Links To Static Pages (https://forum.x-cart.com/showthread.php?t=20278)

Daedalus 03-02-2006 10:33 AM

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!

pauldodman 03-03-2006 01:33 AM

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.

Daedalus 03-03-2006 05:25 PM

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=""}

pauldodman 03-04-2006 04:45 AM

Maybe its the capital I, have you got a capital I in your admin languages to match?

Daedalus 03-04-2006 05:13 AM

Doh! You are so right. I guess I'm not very good at crossing my T's and dotting my I's - literally. :D Thanks again!

pauldodman 03-04-2006 05:20 AM

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!

Daedalus 03-06-2006 03:16 PM

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.

Touchy 03-07-2006 06:21 PM

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.

pauldodman 03-07-2006 10:57 PM

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.

Touchy 03-08-2006 07:06 AM

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


All times are GMT -8. The time now is 06:19 AM.

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