Zen Cart Logo
Forums / Basic Configuration / Adding new element to header menu

Adding new element to header menu

Views: 2,332

Results 1 to 6 of 6
5 Dec 2013, 2:06 PM
#1
gabywalker avatar

gabywalker

New Zenner

Join Date:
Nov 2013
Location:
Ireland
Posts:
40
Plugin Contributions:
0

Adding new element to header menu

I'm using a free template with my zencart, and in this template, there is a header menu under my logo:

// header text in includes/header.php
define('HEADER_TITLE_CREATE_ACCOUNT', 'Create Account');
define('HEADER_TITLE_MY_ACCOUNT', 'My Account');
define('HEADER_TITLE_CART_CONTENTS', 'Shopping Cart');
define('HEADER_TITLE_CHECKOUT', '<span class="header-checkout">Checkout</span>');
define('HEADER_TITLE_TOP', 'Top');
define('HEADER_TITLE_CATALOG', 'Home');
define('HEADER_TITLE_LOGOFF', 'Log Out');
define('HEADER_TITLE_LOGIN', 'Log In');
define('HEADER_TITLE_CONTACT_US', 'Contact Us');

it shows like this:
Attachment 13469

What I want to do is to add one or two clickable buttons to the menu, just after the 'checkout', and they should be taking members to internal pages on my website (also to be created). I'm really not sure how to do this.
The EZ-Pages Display Status – HeaderBar is set to 0 for this template.

Also, the button "LOG IN", I want to rename it to "REGISTER/LOGIN", I've been browsing files and trying to figure out how to fix that, but couldn't. Maybe it's a very obvious and easy thing and I missed something?? :frusty: haha!!

Another thing, I have a space between the logo and the header menu, and I want to decrease/remove that space? whare and how can I do that please?

Any help super appreciated.

5 Dec 2013, 2:37 PM
#2
gjh42 avatar

gjh42

Black Belt

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

Re: Adding new element to header menu

define('HEADER_TITLE_LOGIN', 'Log In');

change to```php
define('HEADER_TITLE_LOGIN', 'Register/Log In');

The code you show is just the language definitions for button text, not the code that builds the navbar. Wherever that code is would be the place to add the HTML for your extra links, likely /includes/templates/your_template/common/tpl_header.php. You will probably need to replicate containers for the new buttons to match the existing ones. We can't say much more without seeing the actual code, and seeing the site live for your styling question.
5 Dec 2013, 3:31 PM
#3
picaflor_azul avatar

picaflor_azul

Totally Zenned

Join Date:
Jul 2009
Location:
picaflor-azul.com
Posts:
6,940
Plugin Contributions:
28

Re: Adding new element to header menu

GabyWalker:

I'm using a free template with my zencart, and in this template, there is a header menu under my logo:

// header text in includes/header.php
define('HEADER_TITLE_CREATE_ACCOUNT', 'Create Account');
define('HEADER_TITLE_MY_ACCOUNT', 'My Account');
define('HEADER_TITLE_CART_CONTENTS', 'Shopping Cart');
define('HEADER_TITLE_CHECKOUT', '<span class="header-checkout">Checkout</span>');
define('HEADER_TITLE_TOP', 'Top');
define('HEADER_TITLE_CATALOG', 'Home');
define('HEADER_TITLE_LOGOFF', 'Log Out');
define('HEADER_TITLE_LOGIN', 'Log In');
define('HEADER_TITLE_CONTACT_US', 'Contact Us');

it shows like this:
Attachment 13469

What I want to do is to add one or two clickable buttons to the menu, just after the 'checkout', and they should be taking members to internal pages on my website (also to be created). I'm really not sure how to do this.
The EZ-Pages Display Status – HeaderBar is set to 0 for this template.

Also, the button "LOG IN", I want to rename it to "REGISTER/LOGIN", I've been browsing files and trying to figure out how to fix that, but couldn't. Maybe it's a very obvious and easy thing and I missed something?? :frusty: haha!!

Another thing, I have a space between the logo and the header menu, and I want to decrease/remove that space? whare and how can I do that please?

Any help super appreciated.

You should always ask questions about the free templates on the template support thread. This way, anyone else who has this question will be able to easily find the answer. Also, it is very likely that your question has already been asked and answered.

If you post a link to your site I will be able to take a look.

With this style of header bar, if you have the header search turned on, it is not recommended to add more links since when you are logged in the my account link is added to the bar and the links may run into the header search.

Thanks,

Anne

5 Dec 2013, 7:06 PM
#4
gabywalker avatar

gabywalker

New Zenner

Join Date:
Nov 2013
Location:
Ireland
Posts:
40
Plugin Contributions:
0

Re: Adding new element to header menu

gjh42:

define('HEADER_TITLE_LOGIN', 'Log In');

> change to```php
define('HEADER_TITLE_LOGIN', 'Register/Log In');

The code you show is just the language definitions for button text, not the code that builds the navbar. Wherever that code is would be the place to add the HTML for your extra links, likely /includes/templates/your_template/common/tpl_header.php. You will probably need to replicate containers for the new buttons to match the existing ones. We can't say much more without seeing the actual code, and seeing the site live for your styling question.

Thanks for your explanation! I'll try to customize that now. :)

5 Dec 2013, 7:12 PM
#5
gabywalker avatar

gabywalker

New Zenner

Join Date:
Nov 2013
Location:
Ireland
Posts:
40
Plugin Contributions:
0

Re: Adding new element to header menu

picaflor-azul:

You should always ask questions about the free templates on the template support thread. This way, anyone else who has this question will be able to easily find the answer. Also, it is very likely that your question has already been asked and answered.

If you post a link to your site I will be able to take a look.

With this style of header bar, if you have the header search turned on, it is not recommended to add more links since when you are logged in the my account link is added to the bar and the links may run into the header search.

Thanks,

Anne

Oh Hi Anne,
I'll remember next time to post template-related questions under templates threads. :blush:
Regarding the header bar, yes I have that in mind, I mean adding menu buttons could cause a mess, but I'm not actually using the header search, that's why I wanted to add a button or two on the right. I'll post this question on the template thread. Thanks loads.

5 Dec 2013, 8:52 PM
#6
picaflor_azul avatar

picaflor_azul

Totally Zenned

Join Date:
Jul 2009
Location:
picaflor-azul.com
Posts:
6,940
Plugin Contributions:
28

Re: Adding new element to header menu

GabyWalker:

Oh Hi Anne,
I'll remember next time to post template-related questions under templates threads. :blush:
Regarding the header bar, yes I have that in mind, I mean adding menu buttons could cause a mess, but I'm not actually using the header search, that's why I wanted to add a button or two on the right. I'll post this question on the template thread. Thanks loads.

No problem, I just wanted to point it out in case you had not though of it ;)

Thanks,

Anne