New Zenner
- Join Date:
- Jul 2008
- Posts:
- 2
- Plugin Contributions:
- 0
How to move navigation bar in header?
Is there any way to move the navigation bar in the header below the logo, instead of on top of it.
Views: 10,031
New Zenner
Is there any way to move the navigation bar in the header below the logo, instead of on top of it.
New Zenner
I discovered the answer to my own question!
Zen Follower
discguy:
I discovered the answer to my own question!
I have been searching for the past 2 hours trying to find out how to move the nav bar below my logo image.
If you would post the solution it would be much appreciated.
Thanks much.
Zencart ROCKS!
Zen Follower
Craft Magick:
I have been searching for the past 2 hours trying to find out how to move the nav bar below my logo image.
If you would post the solution it would be much appreciated.
Thanks much.
Zencart ROCKS!
Just found the answer a few minutes after I posted. Here it is for anyone else frantically searching for the answer as to how to move the navigation bar with home/login links to below the logo image.
BE SURE TO MAKE A BACKUP YOUR TPL_HEADER.PHP FILE BEFORE DOING THIS!!
open the file includes/templates/your_custom_template/common/tpl_header.php
cut ALL of the code between the following 2 lines (be sure to leave both of these lines where they are and do NOT cut them):
<!--bof-header logo and navigation display-->
<!--bof-branding display-->
<!--eof-branding display-->
<!--eof-header logo and navigation display-->
That's it... so simple but being the NOT so php savvy person (and knowing nothing about php syntax) it took me quite a while to actually understand what code to move and where to move it to!!
Good learning experience :clap:
Zencart ROCKS!
Black Belt
You got it almost right, but if I understand your directions correctly, there is a substantive error.
When you move code blocks, you should move entire blocks between and including the
<!--bof xxxx--> and <!--eof xxxx--> comments, to keep the identification correct.You should not move the
<?php if (!isset($flag_disable_header) || !$flag_disable_header) { ?> <div id="headerWrapper">which is between the
<!--bof-header logo and navigation display-->and
<!--bof-navigation display-->You should move the block
<!--bof-navigation display-->...
<!--eof-navigation display-->to below
<!--eof-branding display-->Zen Follower
gjh42:
You got it almost right, but if I understand your directions correctly, there is a substantive error.
When you move code blocks, you should move entire blocks between and including the
<!--bof xxxx--> and <!--eof xxxx--> comments, to keep the identification correct.You should not move the
<?php if (!isset($flag_disable_header) || !$flag_disable_header) { ?> <div id="headerWrapper">which is between the
<!--bof-header logo and navigation display-->and
<!--bof-navigation display-->You should move the block
<!--bof-navigation display-->...
<!--eof-navigation display-->to below
<!--eof-branding display-->
I'm LOL at myself and thank you for the correction, gjh42. All I know is that whatever I did worked so I didn't want to mess with it any further :shocking:
Anyway, thanks for clearing that up.
Zencart ROCKS!
New Zenner
Hi,
I used the above methd and moved the nav bar but what I really want to do and cant figure out how is how to MERGE the nav bar with the categories bar? I want this order:
Home/Category1/Category2/Category3/Contact/LogIn. Anyone could help?
The webpage: http://miniatureinstruments.co.uk/ and I am using ZC 1.8
Thanks:)
New Zenner
No ideas?
New Zenner
Please, someone.
Black Belt
Probably the best method would be to move the <li> elements from the navMainWrapper block in tpl_header.php to appropriate places inside the <ul> in /includes/templates/your_template/templates/tpl_modules_categories_tabs.php. (Remove the entire navMain block from tpl_header.php to avoid duplication.)
Be aware that there are several elements in navMain that only appear when you are logged in or have something in the cart. You want to allow enough space in the row for those, or else make arrangements to display them somewhere else. You also need to decide what you want to do with the search_header element.
New Zenner
Thanks gjh42, that sounds very complicated I dont think I could do it. But thanks anyway.
Black Belt
This would be one arrangement that could work:
(/includes/templates/your_template/templates/tpl_modules_categories_tabs.php)```php
New Zenner
Hello Glen,
I dont have the route you suggest, I have
/includes/templates/your_template/sideboxes/tpl_categories (without background for sub-cats).tpl_categories.php
or
/includes/templates/your_template/sideboxes/tpl_categories.php
Which one shuld I use or do I need to create the one that you suggest?
Thanks,
Csenge
Black Belt
Save the file in exactly the path I noted (adjust "your_template" to your actual template name). The one you describe is for the categories menu in the sidebar.
New Zenner
Hi gjh42,
thanks, now all the categories/headings i want are in one line except Contact Us. Is there any way you could add that. And then how can i disable the original Home/Contact Us/Log in line? Sorry to be a pain.
Black Belt
The standard Zen Cart header nav does not have a contact us link. You could add a line like this (alter if you know something that needs to be different) inside the <ul> list in the position you want it:```php
<li><a href="<?php echo zen_href_link(FILENAME_CONTACT_US, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CONTACT_US; ?></a></li>
You can delete the entire section
<!--bof-navigation display-->
...
<!--eof-navigation display-->
from tpl_header.php.
New Zenner
Thanks Glen, that works :smile: Thanks for all your help!!
Csenge
New Zenner
Is there anyway just to turn the header navigation bar off in the admin? You can do this for Categories etc - Does it pose a problem as a default setup as this is where the login menu is and therfore was not built to be turned off?
Black Belt
This cannot be turned off in admin, as there are several links there that are not necessarily available anywhere else without customization.
Tell staff why this post should be reviewed.