Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / flip navbar & header main bars

flip navbar & header main bars

Locked

Views: 2,325

Results 1 to 16 of 16
This thread is locked. New replies are disabled.
17 Jul 2007, 7:16 PM
#1
jon_tadeu avatar

jon_tadeu

New Zenner

Join Date:
Jun 2007
Posts:
17
Plugin Contributions:
0

flip navbar & header main bars

I've been going crazy trying to figure this out with my limmited knowlege of PHP, and any help would be most appreciated.

Is there a way to put the nav bar under the the header main bar as illustrated in this pic?

17 Jul 2007, 7:59 PM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: flip navbar & header main bars

You just go the the common/tpl_header.php file for your template and swap around the blocks of code that produce them.

18 Jul 2007, 1:52 PM
#3
jon_tadeu avatar

jon_tadeu

New Zenner

Join Date:
Jun 2007
Posts:
17
Plugin Contributions:
0

Re: flip navbar & header main bars

Thanks for the quick reply. but I must admit my n00bness is still getting the best of me.

I found the commons directory under Includes and put the block that starts with```

<!--bof-header logo and navigation display-->

and ends with

<!--eof-navigation display-->

under the one that starts with

<!--bof-branding display-->

and ends with

<!--eof-branding display-->

Am I editing the right tpl_header.php or did I just cut and paste the wrong part?
19 Jul 2007, 9:07 AM
#4
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: flip navbar & header main bars

You have cut and pasted exactly the right code, so if it's not taking effect you must have done it in a file that is not the one being called by your template, or not loaded the changes back to the right place. Unfortunately this is difficult to diagnose without a link to your site or more information about how you have structured your template.

20 Jul 2007, 6:57 PM
#5
jon_tadeu avatar

jon_tadeu

New Zenner

Join Date:
Jun 2007
Posts:
17
Plugin Contributions:
0

Re: flip navbar & header main bars

The link to the page is Here
Unfortunately, I'm pretty confused with what exactly my structure is at the time. Since I have not started this from scratch, or understand PHP very much, I really have no idea what logic is being used to structure everything.

For example, there are at least 3 includes (one under admin, one in the root directory and one inside the Includes in the root directory) and i have no idea which one it's referencing to. I am very well versed in both HTML and CSS, but I'm getting the feeling I'm a complete lunk-head when it comes to PHP.

Once again, thanks for the help.

20 Jul 2007, 7:17 PM
#6
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: flip navbar & header main bars

There should only be two include folders, one in root for your Catalog and one in the admin folder that serves your Admin.

It is rather sounding as though your structure is corrupted and causing your problems. Unfortunately there's a limit to what we can do to help you on this as these files are all server side and thus invisible to us.

But let's try anyway. What's in your includes/includes folder?

20 Jul 2007, 8:37 PM
#7
jon_tadeu avatar

jon_tadeu

New Zenner

Join Date:
Jun 2007
Posts:
17
Plugin Contributions:
0

Re: flip navbar & header main bars

Basically just english.php and an english directory as well. inside that directory I have header.php and meta_tags.php and another directory called Classic. Inside Classic there is a header.php.

20 Jul 2007, 9:48 PM
#8
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: flip navbar & header main bars

Do you have file compare software, such as the Open Source WinMerge that you can use to compare the files in include/include with those in include?

Alternatively, you could just throw them away, as they aren't having any effect anyway.

Back to your original problem. What is the full path name from the store's root of the file in which you switched around the branding and navigation blocks?

20 Jul 2007, 11:23 PM
#9
jon_tadeu avatar

jon_tadeu

New Zenner

Join Date:
Jun 2007
Posts:
17
Plugin Contributions:
0

Re: flip navbar & header main bars

It was on the root/include/common/tpl_header.php.

The /include under /admin does not seem to have a common folder.

20 Jul 2007, 11:28 PM
#10
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: flip navbar & header main bars

Not should the includes folder. This file should be in your root/includes/templates/mbb/common folder. Your structure is sounding pretty messed up. I'd recommend comparing it with the structure in a Zen Cart release package.

21 Jul 2007, 2:38 AM
#11
jon_tadeu avatar

jon_tadeu

New Zenner

Join Date:
Jun 2007
Posts:
17
Plugin Contributions:
0

Re: flip navbar & header main bars

I think that nailed it, right on the head.
Thanks Kuroi:clap:

28 Jul 2007, 1:57 AM
#12
jaynt avatar

jaynt

New Zenner

Join Date:
Jul 2007
Posts:
15
Plugin Contributions:
0

Re: flip navbar & header main bars

Hi

I am also trying this.
The problem i have is that i get white space between the
Header and Navbar. When they should be tucked up tight to each other.
Any ideas on why this is happening ?

28 Jul 2007, 6:36 AM
#13
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: flip navbar & header main bars

JayNT:

i get white space between the
Header and Navbar. When they should be tucked up tight to each other.
Any ideas on why this is happening ?Do you have a link to your site?

28 Jul 2007, 4:22 PM
#14
jaynt avatar

jaynt

New Zenner

Join Date:
Jul 2007
Posts:
15
Plugin Contributions:
0

Re: flip navbar & header main bars

Hi Kuroi

No link as i am running it on test sever at the mo
This is my tpl_header
everything abve the header div is still there .

?><div id="headerWrapper">
<!--bof-branding display-->
<div id="logoWrapper">
    <div id="logo"></div>
<?php if (HEADER_SALES_TEXT != '' || (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2))) { ?>
    <div id="taglineWrapper">
<?php
              if (HEADER_SALES_TEXT != '') {
?>
      
<?php
              }
?>
<?php
              if (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2)) {
                if ($banner->RecordCount() > 0) {
?>
      <div id="bannerTwo" class="banners"><?php echo zen_display_banner('static', $banner);?></div>
<?php
                }
              }
?>
    </div>
<?php } // no HEADER_SALES_TEXT or SHOW_BANNERS_GROUP_SET2 ?>
</div>
<br class="clearBoth" />
<!--eof-branding display-->
<!--bof-header logo and navigation display-->
<?php
if (!isset($flag_disable_header) || !$flag_disable_header) {
?>


<!--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>
<?php if ($_SESSION['customer_id']) { ?>
    <li><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li>
    <li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></li>
<?php
      } else {
        if (STORE_STATUS == '0') {
?>
    <li><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a></li>
<?php } } ?>

<?php if ($_SESSION['cart']->count_contents() != 0) { ?>
    <li><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a></li>
    <li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a></li>
<?php }?>
</ul>
</div>
<div id="navMainSearch"><?php require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?></div>
<br class="clearBoth" />
</div>
<!--eof-navigation display-->

<!--eof-header logo and navigation display-->

<!--bof-optional categories tabs navigation display-->
<?php require($template->get_template_dir('tpl_modules_categories_tabs.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_categories_tabs.php'); ?>
<!--eof-optional categories tabs navigation display-->

<!--bof-header ezpage links-->
<?php if (EZPAGES_STATUS_HEADER == '1' or (EZPAGES_STATUS_HEADER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?>
<?php require($template->get_template_dir('tpl_ezpages_bar_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_header.php'); ?>
<?php } ?>
<!--eof-header ezpage links-->
</div>
<?php } ?>
28 Jul 2007, 4:29 PM
#15
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: flip navbar & header main bars

There are a large number of reasons why whitespace can appear in and around a Zen Cart header. It can depend on the code, the CSS, their interaction, the type of images being used and the borwser through which the site is being viewed.

This makes it futile to try to diagnose the problem without even being able to see it, let alone see how all the above are interacting. Please let us know when you are ready to put the site somewhere that it can be seen, and I'll be happy to take a look then.

1 Aug 2007, 10:19 AM
#16
jaynt avatar

jaynt

New Zenner

Join Date:
Jul 2007
Posts:
15
Plugin Contributions:
0

Re: flip navbar & header main bars

I get the same problem using the default Zen cart template after a fresh install