Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2013
    Location
    Ireland
    Posts
    40
    Plugin Contributions
    0

    Default 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:
    Name:  menu.jpg
Views: 323
Size:  4.1 KB

    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?? 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.

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Adding new element to header menu

    PHP Code:
    define('HEADER_TITLE_LOGIN''Log In'); 
    change to
    PHP Code:
    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.

  3. #3
    Join Date
    Jul 2009
    Location
    picaflor-azul.com
    Posts
    6,930
    Plugin Contributions
    45

    Default Re: Adding new element to header menu

    Quote Originally Posted by GabyWalker View Post
    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:
    Name:  menu.jpg
Views: 323
Size:  4.1 KB

    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?? 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

  4. #4
    Join Date
    Nov 2013
    Location
    Ireland
    Posts
    40
    Plugin Contributions
    0

    Default Re: Adding new element to header menu

    Quote Originally Posted by gjh42 View Post
    PHP Code:
    define('HEADER_TITLE_LOGIN''Log In'); 
    change to
    PHP Code:
    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. #5
    Join Date
    Nov 2013
    Location
    Ireland
    Posts
    40
    Plugin Contributions
    0

    Default Re: Adding new element to header menu

    Quote Originally Posted by picaflor-azul View Post
    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.
    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.

  6. #6
    Join Date
    Jul 2009
    Location
    picaflor-azul.com
    Posts
    6,930
    Plugin Contributions
    45

    Default Re: Adding new element to header menu

    Quote Originally Posted by GabyWalker View Post
    Oh Hi Anne,
    I'll remember next time to post template-related questions under templates threads.
    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

 

 

Similar Threads

  1. v150 Adding new element to main or other page
    By dream_mike in forum Templates, Stylesheets, Page Layout
    Replies: 20
    Last Post: 15 Oct 2012, 09:55 PM
  2. adding pages to header menu
    By alexdog1805 in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 6 Mar 2011, 06:06 PM
  3. Adding additional menu links to header.
    By raydeez in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 29 Apr 2009, 11:29 PM
  4. Adding links to header menu--Logo.gif link
    By Dizzie in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 17 Dec 2006, 01:32 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR