Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / moving the home log in

moving the home log in

Locked

Views: 3,310

Results 1 to 19 of 19
This thread is locked. New replies are disabled.
3 Feb 2008, 5:55 PM
#1
sheba10 avatar

sheba10

New Zenner

Join Date:
Nov 2006
Posts:
43
Plugin Contributions:
0

moving the home log in

After searchiing I figured out how to move the home and log in under my logo, but can't find any information how to move it on the same line as my shop about etc... links.

Any advice?

http://ratkiss.net/index.php

3 Feb 2008, 6:19 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: moving the home log in

Your shop links etc are in the ezpage div - home and others are in the navmain div...this display is ordered and controlled in the tpl_header.php file...

To accomplish what you seek you would have to move one or the other's code into the same div something like this if navmain was chosen(I did not check this for function):

<!--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>
<!--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>
<div id="navMainSearch"><?php require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?></div>
<br class="clearBoth" />
</div>
<!--eof-navigation display-->
3 Feb 2008, 6:21 PM
#3
gjh42 avatar

gjh42

Black Belt

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

Re: moving the home log in

They are two separate divs.
You could move the code from #navMain into the #navEZPages div or vice versa, or you could remove the <br class="clearBoth" /> from after the search code in /includes/templates/your_template/common/tpl_header.php. That forces what follows to be on a new line.

You would then need to add clear: both to #contentMainWrapper so it behaves correctly. Find in or add to your stylesheet:

#navMainWrapper .clearBoth {display: none;}

#contentMainWrapper {clear: both;}

3 Feb 2008, 6:38 PM
#4
sheba10 avatar

sheba10

New Zenner

Join Date:
Nov 2006
Posts:
43
Plugin Contributions:
0

Re: moving the home log in

Thank you both for the speedy reply, I followed what Kobra posted and it looks right!

3 Feb 2008, 6:46 PM
#5
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: moving the home log in

You might want to add this to the entry in your stylesheet and see if you prefer this:

#navEZPagesTop {
        float: right;
	font-size: 0.95em;
	font-weight: bold;
	margin: 0em;
	padding: 0.5em 0 0.5em 1.5em;
	}
3 Feb 2008, 6:52 PM
#6
sheba10 avatar

sheba10

New Zenner

Join Date:
Nov 2006
Posts:
43
Plugin Contributions:
0

Re: moving the home log in

Thanks again, it looks even better like that.

:D

3 Feb 2008, 7:25 PM
#7
sheba10 avatar

sheba10

New Zenner

Join Date:
Nov 2006
Posts:
43
Plugin Contributions:
0

Re: moving the home log in

I just added a backgroud image to that area and the same image is showing up just above the site info copyright area, Do you know why that happened?

3 Feb 2008, 7:33 PM
#8
gjh42 avatar

gjh42

Black Belt

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

Re: moving the home log in

You added the background to a group declaration, where several elements are controlled. You need to separate out #navMainWrapper into its own line, and style that with the background.

3 Feb 2008, 7:39 PM
#9
sheba10 avatar

sheba10

New Zenner

Join Date:
Nov 2006
Posts:
43
Plugin Contributions:
0

Re: moving the home log in

Ah ha!
Thank you Glenn, I believe I fixed it now.

17 Feb 2008, 5:35 PM
#10
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: moving the home log in

Grrrrrr... I followed all of this, and it didn't work for me.. I moved the EZ Links to the "navMain" div. I commented out both "<br class="clearBoth" />" in the file. Both sets of links still appear on two lines.:censored:

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

Any ideas what I missed/did wrong??

17 Feb 2008, 9:14 PM
#12
gjh42 avatar

gjh42

Black Belt

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

Re: moving the home log in

There is styling that goes with this to get the elements arranged properly. Also, you have a declaration in your stylesheet that prevents the correct styling from taking effect.```
#navMain ul { <----------------------delete this declaration
float:none; margin: 0 auto <---this is making the "home" list take full width
}
/add these to your stylesheet/
#contentMainWrapper {clear: both;}
#navMain {float: left;}
#navEZPagesTop {float: right;}

17 Feb 2008, 11:22 PM
#13
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: moving the home log in

gjh42:

There is styling that goes with this to get the elements arranged properly. Also, you have a declaration in your stylesheet that prevents the correct styling from taking effect.```
#navMain ul { <----------------------delete this declaration
float:none; margin: 0 auto <---this is making the "home" list take full width
}
/add these to your stylesheet/
#contentMainWrapper {clear: both;}
#navMain {float: left;}
#navEZPagesTop {float: right;}

8 Sep 2008, 4:34 AM
#14
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: moving the home log in

Hate to bump this old post, but I wanted to update with new information. I needed to move the "navMain" links to the "EZPages" links location (below the header)..

Turns out that moving the navMain links to the EZPages links section is only part of the solution. I found I needed to add a new ID to my stylesheet to make the links play nice together. So I updated my tpl_header.php file to include a new container for my consolidated menu as follows:

<?php
/**
 * Common Template - tpl_header.php
 *
 * this file can be copied to /templates/your_template_dir/pagename<br />
 * example: to override the privacy page<br />
 * make a directory /templates/my_template/privacy<br />
 * copy /templates/templates_defaults/common/tpl_footer.php to /templates/my_template/privacy/tpl_header.php<br />
 * to override the global settings and turn off the footer un-comment the following line:<br />
 * <br />
 * $flag_disable_header = true;<br />
 *
 * @package templateSystem
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_header.php 4813 2006-10-23 02:13:53Z drbyte $
 */
?>

<?php
  // Display all header alerts via messageStack:
  if ($messageStack->size('header') > 0) {
    echo $messageStack->output('header');
  }
  if (isset($_GET['error_message']) && zen_not_null($_GET['error_message'])) {
  echo htmlspecialchars(urldecode($_GET['error_message']));
  }
  if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) {
   echo htmlspecialchars($_GET['info_message']);
} else {

}
?>


<!--bof-header logo and navigation display-->
<?php
if (!isset($flag_disable_header) || !$flag_disable_header) {
?>

<div id="headerWrapper">
<!--bof-navigation display-->
<div id="navMainWrapper">
<div id="navMainSearch"><?php require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?></div>
<br class="clearBoth" />
</div>
<!--eof-navigation display-->

<!--bof-branding display-->
<div id="logoWrapper">
<?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
              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-->

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

<!--Begin consolidation of navMain & TopEZPages links-->
<div id="navConsolidated">
<!--bof-header navMain-->
<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>
<!--eof-header navMain links-->
<!--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>
<!--End consolidation of navMain & TopEZPages links-->
</div>
<?php } ?>
```I added the "navConsolidated" ID to my stylesheet. I put my  menu background image here, and removed the background attributes from the "navMain" and "EZPages" sections of the stylesheet.

Here's my stylesheet entries that I used to get my consolidated  top menu playing nice together..

#navMainWrapper {
display: none;
}

#navConsolidated {
background-image: url(../images/TopToolbarBackground.png);
height:36px;
background-position: bottom;
background-repeat: no-repeat;
background-color: #383E44;
color: #383E44;
font-weight: bold;
}

#navEZPagesTop {
margin: 0.5em;
padding: 0.5em 0.3em;
float: right;
}

#navMain ul {
margin: 0em;
padding-left: 0.3em;
list-style-type: none;
}

#navMain ul li {
display: inline;
}

#navMain ul li a {
margin-top: 0.5em;
padding-top: 0.5em;
padding-right: 1.5em;
text-decoration: none;
color: #FFFFFF;
float: left;
white-space: nowrap;
}

10 Sep 2008, 6:13 AM
#15
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: moving the home log in

Correction to stylesheet entries to make the navMain and EZPagesTop links line up vertically correctly. The correction is highlighted in red..

#navEZPagesTop {
    margin: 0.5em;
    padding: 0.5em 0.3em;
    float: right;
    }

#navMain ul {
    margin: 0.5em;
    padding-left: 0.3em;
    list-style-type: none;
    }
18 Sep 2008, 6:04 PM
#16
monkeypeach avatar

monkeypeach

New Zenner

Join Date:
Jul 2008
Posts:
44
Plugin Contributions:
0

Re: moving the home log in

DivaVocals:

Hope this is useful to someone else.. I'm sure the experts here will let me know if I've gotten any of this wrong..:laugh: So far it is all working well..:P

Thanks, just what I needed. One thing though, how do I go about changing my font etc, so it matches my ez pages links?

http://www.monkeypeach.co.uk/

1 Apr 2009, 1:53 AM
#17
cjsmiff avatar

cjsmiff

Zen Follower

Join Date:
Jul 2006
Location:
UK
Posts:
170
Plugin Contributions:
0

Re: moving the home log in

monkeypeach:

Thanks, just what I needed. One thing though, how do I go about changing my font etc, so it matches my ez pages links?

http://www.monkeypeach.co.uk/

Did anyone find an answer to this please?

I'm having colour issues with the ezpage top nav links being the same colour as the general site links instead of the ezpage links.

http://mykspa.co.uk/index.php

Many thanks
Claire
:blink:

1 Apr 2009, 2:50 AM
#18
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: moving the home log in

cjsmiff:

I'm having colour issues with the ezpage top nav links being the same colour as the general site links instead of the ezpage links.
?????
You can add the following to adjust the ezpage links
Hope that is wat you were trying to say

#navEZPagesTop a{
        color: #ffffff;
        }
1 Apr 2009, 3:52 AM
#19
cjsmiff avatar

cjsmiff

Zen Follower

Join Date:
Jul 2006
Location:
UK
Posts:
170
Plugin Contributions:
0

Re: moving the home log in

monkeypeach:

Thanks, just what I needed. One thing though, how do I go about changing my font etc, so it matches my ez pages links?

http://www.monkeypeach.co.uk/

kobra:

?????
You can add the following to adjust the ezpage links
Hope that is wat you were trying to say

#navEZPagesTop a{
color: #ffffff;
}


Thank you soooooo much it was starting to drive me a little mad. It's been a long night/week (:lookaroun) lol! 

Cheers
Claire :clap: