Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Sep 2006
    Location
    North Devon, England, UK
    Posts
    254
    Plugin Contributions
    0

    Default Header Nav Code Modification

    Hello

    I am working on my site, it is here http://www.sorce.co.uk/logo-golf-balls/

    I would like all the nav links, like 'log on', 'my account', 'shopping cart', 'checkout', etc., to show, even though you may not have added anything to basket, for example.

    Can anyone advise which code in tpl_header.php to alter to achieve this?

    Help very much appreciated!

  2. #2
    Join Date
    Aug 2005
    Posts
    26,512
    Plugin Contributions
    9

    Default Re: Header Nav Code Modification

    First insure that you are using the overrides, or make a copy of the tpl_header.php file in the event this does not work.

    In this file, in the or under <!--bof-navigation display--> the first "if" or about 5 lines below the bof is this line:
    Code:
    <?php if ($_SESSION['customer_id']) { ?>
    and comment this out or remove it. This should display the li's without checking if a session is active
    Zen-Venom Get Bitten
    Get Your Business Found

  3. #3
    Join Date
    Sep 2006
    Location
    North Devon, England, UK
    Posts
    254
    Plugin Contributions
    0

    Default Re: Header Nav Code Modification

    Hey Kobra

    Thanks for getting back to me.

    I took the <?php // if ($_SESSION['customer_id']) { ?> line out from tpl_header.php, uploaded, but now shows an error page:

    Parse error: parse error, unexpected '}' in c:\domains\sorce.co.uk\wwwroot\logo-golf-balls\includes\templates\arch_shoppe\common\tpl_header.php on line 114

    Any ideas?

    Another realted question: How do i center this header nav? I can't seem to locate the correct bit of css to do this
    Last edited by mattys; 18 Oct 2006 at 07:57 PM. Reason: Add another question

  4. #4
    Join Date
    Aug 2005
    Posts
    26,512
    Plugin Contributions
    9

    Default Re: Header Nav Code Modification

    Sorry that did not work....I only "hack" at php and why I cautioned to make copies.

    Centering the header nav?? We discussing the nav bar or the text contained within it?
    Zen-Venom Get Bitten
    Get Your Business Found

  5. #5
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,039
    Plugin Contributions
    31

    Default Re: Header Nav Code Modification

    Since that line of code is part of an "if/else" statement, just removing the one line will generate the error you are getting.

    You'll need to change the whole section as follows:

    Code:
    <?php if ($_SESSION['customer_id']) { ?> /* delete this line */
        <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 { /* delete this line */
            if (STORE_STATUS == '0') {
    ?> /* delete this line */
        <li><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a></li>
    <?php } } ?> /* delete the highlighted character */
    
    <?php if ($_SESSION['cart']->count_contents() != 0) { ?> /* delete this line */
        <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 }?> /* delete this line */

  6. #6
    Join Date
    Sep 2006
    Location
    North Devon, England, UK
    Posts
    254
    Plugin Contributions
    0

    Default Re: Header Nav Code Modification

    No worries, I am much like yourself, a bit of a hacker, but i really appreciate your input.

    Its the same text links that i am trying to work with here - i am just thinking that if i CAN'T show all links (but i'm sure there must be a way somehow, there has to be!?) the links that are there would look better centre aligned.

    See what i mean?

  7. #7
    Join Date
    Sep 2006
    Location
    North Devon, England, UK
    Posts
    254
    Plugin Contributions
    0

    Default Re: Header Nav Code Modification

    hey clydejones

    i thought that might be the case

    i will give it a go and report back

  8. #8
    Join Date
    Sep 2006
    Location
    North Devon, England, UK
    Posts
    254
    Plugin Contributions
    0

    Default Re: Header Nav Code Modification

    Thanks Clyde

    That worked.

    The only bit i had problems with was this bit, line 7 (before code is deleted):

    Code:
    ?> /* delete this line */
    When i uploaded the modified code, I got an error, some kind of parse problem and a mention of a missing
    Code:
    >
    So, i just put that bit of code back and it seems to be working, all links are now displayed.

    I hope this is ok and doesn't casue any problems down the line.

    Cheers for all the help, things seem to be going fairly well, nice bit of kit!

  9. #9
    Join Date
    Sep 2006
    Location
    North Devon, England, UK
    Posts
    254
    Plugin Contributions
    0

    Default Re: Header Nav Code Modification

    still stumped on how to now centre the links

    i added text-align centre to the code below but still not centering

    Code:
    #navMainWrapper, #navSuppWrapper, #navCatTabsWrapper {
    	margin: 0em;
    	background-color: #FFFFFF;
    	font-weight: bold;
    	color: #F5F4C5;
    	height: 1%;
    	}

  10. #10
    Join Date
    Sep 2006
    Location
    North Devon, England, UK
    Posts
    254
    Plugin Contributions
    0

    Default Re: Header Nav Code Modification

    ok, centered

    i found:

    Code:
    .back {
    	float: none;
    	}
    and:

    Code:
    #navMain ul, #navSupp ul, #navCatTabs ul {
    	margin: 0;
    	padding: 0em;
    	list-style-type: none;
    	text-align: center;
    	}
    in stylesheet.css

    and changed to what they are as shown above

    .back is the class added to the <ul>:

    Code:
    <ul class="back">
    This had a 'left float' on it, so i changed it 'none'. This then freed up #navMain, so i added a text-align:center to that and it worked.

    I'm not sure what the long term affects will be by changing the .back class, in stylesheet.css, from float: left, to float: none, will have to wait and see
    Last edited by mattys; 18 Oct 2006 at 10:33 PM.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Centering EZPages Nav. Menu in Header
    By liebling in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 15 Jul 2008, 11:26 AM
  2. dropdown menus - suckerfish - basics?
    By mafiasam in forum Templates, Stylesheets, Page Layout
    Replies: 14
    Last Post: 21 Aug 2006, 06:33 AM
  3. Future Zen Template - fullwidth_capsule.gif nav bar?
    By bhuntsman in forum Addon Templates
    Replies: 2
    Last Post: 2 Aug 2006, 12:56 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
  •