Forums / General Questions / Menu change

Menu change

Locked

Views: 5,989

Results 1 to 13 of 13
This thread is locked. New replies are disabled.
4 Nov 2007, 3:08 PM
#1
ekles avatar

ekles

New Zenner

Join Date:
Aug 2005
Posts:
73
Plugin Contributions:
0

Menu change

Hi

On the top menu with Home,LogIn, etc etc how do I add an extra link.

Reason

We run the shop in a sub domain and of course the home button is actually the shop home page. What we intend to do is rename the current "home" link to "Shop home" and the sites homepage to "home"

Search has not led us to an answer at this time on how to add this in.

Thanks folks

Making sure we get the cost of freight back will drive us all mad at some stage.

4 Nov 2007, 4:14 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Menu change

You will want to change the define for HEADER_TITLE_CATALOG from 'Home' to 'Shop Home':
/includes/languages/english/your_template/header.php

Line #15 : define('HEADER_TITLE_CATALOG', 'Home');

and probably add a define for site home:
/includes/languages/english/your_template/header.php

define('HEADER_TITLE_SITE', 'Home');

Then you can modify the link code in /includes/templates/your_template/common/tpl_header.php.

You can hard-code the url, or use an ez-page external link to lead to it.
Find this:```php

<!--bof-navigation display--> <div id="navMainWrapper"> <div id="navMain"> <ul class="back"> <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li> ```and add a line similar to this```php <!--bof-navigation display--> <div id="navMainWrapper"> <div id="navMain"> <ul class="back"> <li><?php echo '<a href="' . zen_ez_pages_link(23) . '">'; ?><?php echo HEADER_TITLE_SITE; ?></a></li> <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li> ```
4 Nov 2007, 5:40 PM
#3
ekles avatar

ekles

New Zenner

Join Date:
Aug 2005
Posts:
73
Plugin Contributions:
0

Re: Menu change

Perfect thank you

Making sure we get the cost of freight back will drive us all mad at some stage.

10 Nov 2007, 5:12 PM
#4
bahnstoermer avatar

bahnstoermer

New Zenner

Join Date:
Aug 2007
Posts:
94
Plugin Contributions:
0

Re: Menu change

Got a little lost somewhere in here...

I also added a link to the top nav bar (tpl_header), but this link is echoed in the footer and I don't want it to be.

<div id="navMain">
    <ul class="back">
    <li><a href="http://MYSITE.com/">Home</a></li>
    <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li> 

But I don't want this same link in the footer (tpl_footer). If I comment out the code below this works except I get a leading "::" in the footer which indicates to me I clearly did something wrong. I don't have any EZPage enabled for this link in the footer. I think it's also likely this is the result of something I did earlier but can't recall.

<!--bof-navigation display -->
<div id="navSuppWrapper">
<div id="navSupp">
<ul>
<!--comment out link to home -->
<!-- <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG. '">'; ?>//<?php echo HEADER_TITLE_CATALOG; ?></a></li> --->

I'm still not an expert at this, but hopefully my questions/posts are getting more intelligent! Thanks for the great forum support.

11 Nov 2007, 7:38 PM
#5
bahnstoermer avatar

bahnstoermer

New Zenner

Join Date:
Aug 2007
Posts:
94
Plugin Contributions:
0

Re: Menu change

Anyone able to get me pointed on the right direction with the extra :: in my footer? :cool:

28 Feb 2008, 2:58 AM
#6
cyke0 avatar

cyke0

New Zenner

Join Date:
Feb 2008
Posts:
1
Plugin Contributions:
0

Re: Menu change

gjh42:

You will want to change the define for HEADER_TITLE_CATALOG from 'Home' to 'Shop Home':
/includes/languages/english/your_template/header.php

Line #15 : define('HEADER_TITLE_CATALOG', 'Home');

and probably add a define for site home:
/includes/languages/english/your_template/header.php

define('HEADER_TITLE_SITE', 'Home');

Then you can modify the link code in /includes/templates/your_template/common/tpl_header.php.

You can hard-code the url, or use an ez-page external link to lead to it.
Find this:```php

<!--bof-navigation display--> <div id="navMainWrapper"> <div id="navMain"> <ul class="back"> <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li> ```and add a line similar to this```php <!--bof-navigation display--> <div id="navMainWrapper"> <div id="navMain"> <ul class="back"> <li><?php echo '<a href="' . zen_ez_pages_link(23) . '">'; ?><?php echo HEADER_TITLE_SITE; ?></a></li> <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li> ```

Followed this info..

Now the home page leads me to "index.php?main_page=index"

Trying to figure out where i go to revise the main_page to be my primary website as opposed to the index of proshop.

1 Apr 2008, 2:18 PM
#9
reeflippee avatar

reeflippee

New Zenner

Join Date:
Mar 2008
Posts:
64
Plugin Contributions:
0

Re: Menu change

Help! I was able to accomplish this, but in doing so I lost my header image!! What happened?? :blink:

https://www.flippee.com/zencart

Thanks!

1 Apr 2008, 2:20 PM
#10
reeflippee avatar

reeflippee

New Zenner

Join Date:
Mar 2008
Posts:
64
Plugin Contributions:
0

Re: Menu change

Found it!! Thanks anyway!

Glenn - you're posts are always well explained and helpful! Thank you!!

26 Jan 2010, 10:58 AM
#11
stumpy74 avatar

stumpy74

New Zenner

Join Date:
Oct 2009
Posts:
26
Plugin Contributions:
0

Re: Menu change

Hi - I am having an issue as well....

My template has tabs which change colour based upon the current page.

I have just modified the menu to include a ez-page "Testimonials". This is ID=9. Below is the standard template code for specials and the new one I have added

<?php
if ($current_page_base == 'specials') { $active = 'tab_active'; 
	} else { $active = '';
}?>
		<li id="<?php echo $active;?>"><a href="index.php?main_page=specials"><?php echo TOP_MENU_SPECIALS;?></a></li>

<?php 
if ($current_page_base == 'page&id=9') { $active = 'tab_active'; 
	} else { $active = '';
}?>
		<li id="<?php echo $active;?>"><a href="index.php?main_page=page&id=9"><?php echo TOP_MENU_TESTIMONIALS;?></a></li>

The problem is I am not getting the selected tab "active" (which changes its colour) using $current_page_base == 'page&id=9. Is there something special to use for a ez-page in this context ???

Website http://www.adorablebabycakes.com.au

Thanks

28 Jan 2010, 8:12 AM
#12
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Menu change

if ($current_page_base == 'page&id=9')

$current_page_base will only ever equal 'page' for ez-pages; you need to keep the id test separate:

if (($current_page_base == 'page') and ($_GET['id'] == '9'))
28 Jan 2010, 11:19 AM
#13
stumpy74 avatar

stumpy74

New Zenner

Join Date:
Oct 2009
Posts:
26
Plugin Contributions:
0

Re: Menu change

Thanks Glenn