Page 1 of 3 123 LastLast
Results 1 to 10 of 26
  1. #1
    Join Date
    Mar 2005
    Location
    Tempe, AZ
    Posts
    324
    Plugin Contributions
    0

    How to add links to header bar without ez-pages

    I saw many people asked about this and the files where archieved, i really didn't see a clear answer to their questions on how to add a link to the header bar. I may have missed this for give me. But i thought i'll explain how i did it without using ez-pages.

    Two files need to be looked at includes/template/your template/tpl_header.php

    in this file look for:
    <table border="0" cellspacing="0" cellpadding="0" class="headerNavigation" align="center">
    <tr class="headerNavigation">
    <td align="left" valign="top" width="80%" class="headerNavigation">
    <a href="<?php echo zen_href_link(FILENAME_DEFAULT, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CATALOG; ?></a>&nbsp;|&nbsp;

    This should be around line 67 - 70,
    right after the last "&nbsp;|&nbsp;"
    add your links, which should look somthing like this:

    <a href="<?php echo zen_href_link(FILENAME_DEFAULT, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CATALOG; ?></a>&nbsp;|&nbsp;
    <!--Extra links-->
    <a href="<?php echo zen_href_link(FILENAME_PRODUCTS_ALL); ?>"><?php echo BOX_HEADING_PRODUCTS_ALL; ?></a>&nbsp;|&nbsp;
    <a href="<?php echo zen_href_link(FILENAME_SPECIALS); ?>"><?php echo BOX_HEADING_SPECIALS; ?></a>&nbsp;|&nbsp;
    <a href="<?php echo zen_href_link(FILENAME_PRODUCTS_NEW); ?>"><?php echo BOX_HEADING_WHATS_NEW; ?></a>&nbsp;|&nbsp;
    <a href="<?php echo zen_href_link(FILENAME_FEATURED_PRODUCTS); ?>"><?php echo BOX_HEADING_FEATURED_PRODUCTS; ?></a>&nbsp;|&nbsp;
    <a href="<?php echo zen_href_link(FILENAME_CONTACT_US); ?>"><?php echo BOX_INFORMATION_CONTACT; ?></a>&nbsp;|&nbsp;

    Now the second file should be your includes/languages/your languae/your template/english.php.

    you need to make sure your heading in your english file matched the one you wish to use. In this case i use "BOX_HEADING_FEATURED_PRODUCTS" this will display the text for the heading in the english file. "Featured products"

    Test it out see how the links display on your header bar you may need to adjust the table so the text align correctly.

    You can see the results on my page www.lextechs.com

    I hope this helps out and i have not stepped on anyone toes. I just thougth i'd help a bit or make it a bit easier for others to find in the further.

    Thanks

    Lextechs
    Lextechs.com Powered By ZenCart

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: How to add links to header bar without ez-pages

    Very helpful ...

    Note: your configure.php files are setup for:
    lextechs.com

    Your secure certificate is issued to:
    www.lextechs.com

    Your are throwing errors because of this ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Mar 2006
    Location
    San Francisco, CA
    Posts
    45
    Plugin Contributions
    0

    Default Re: How to add links to header bar without ez-pages

    Were these links added to Zen Cart 1.3.5? Because I don't see anything like this:

    <table border="0" cellspacing="0" cellpadding="0" class="headerNavigation" align="center">
    <tr class="headerNavigation">
    <td align="left" valign="top" width="80%" class="headerNavigation">
    <a href="<?php echo zen_href_link(FILENAME_DEFAULT, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CATALOG; ?></a>&nbsp;|&nbsp;

    in includes/template/your template/tpl_header.php for 1.3.5.

    I am trying to add a single link in the header bar called "Site Map" to link to
    http://www.holymtn.com/sitemap.htm

    so that our clients can access the rest of our site from the Zen Cart catalog folder without having to use their "Back" buttons. We have thousands of pages on our original site and it may take years (if ever) for us to incorporate all our content into the Zen Cart matrix. Our current plan is for the catalog only to run on Zen Cart, therefore we need a link to our original site map in the navigation bar.

  4. #4
    Join Date
    Mar 2006
    Location
    Los Angeles
    Posts
    287
    Plugin Contributions
    3

    Default Re: How to add links to header bar without ez-pages

    ooh i have to try this. i was trying to use an image map to add some links on the header that would change depending on the language selected. this might be my solution.

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

    Default Re: How to add links to header bar without ez-pages

    For v1.3.5 look in includes -> templates -> YOUR_TEMPLATE -> common -> tpl_header.php

    find this code:

    PHP Code:
    <div id="navMain">
        <ul class="back">
        <li><?php echo '<a href="' zen_href_link(FILENAME_DEFAULT'''NONSSL'); ?>"><?php echo HEADER_TITLE_CATALOG?></a></li>
    <li><a href="http://www.holymtn.com/sitemap.htm">Site Map</a></li>
    add your link as indicated.

  6. #6
    Join Date
    Mar 2006
    Location
    Los Angeles
    Posts
    287
    Plugin Contributions
    3

    Default Re: How to add links to header bar without ez-pages

    many thanks to lextechs!
    I now know how to add links with php.

    this was exactly what I needed and I was able to implement a nav bar under the header image with links to my MORE INFO pages!

    Now I can forget about that image map I couldn't get to work. hehe

  7. #7
    Join Date
    Mar 2006
    Location
    San Francisco, CA
    Posts
    45
    Plugin Contributions
    0

    Default Re: How to add links to header bar without ez-pages

    That worked beautifully, clydejones. Thank you very much!

  8. #8
    Join Date
    May 2004
    Location
    Hong Kong
    Posts
    1,291
    Plugin Contributions
    1

    Default Re: How to add links to header bar without ez-pages

    As seen above use the pipeline | as separator with the code,
    &nbsp;|&nbsp;

    Suggest change it to as below, if for validation. Otherwise there will have two kinds of warnings about the pipeline and the li.
    Suggested code for v1.3.5:
    <li id=navMainMySeparator>&nbsp;& #124;</li>

    Please note,
    the code
    & #124;
    which should without any space.
    I separated it for the forum show it as pipe line instead of the code.
    And the html code equivalent to the pipeline display.

    The added <li> ..</li> also for validation. And the added id navMainMySeparator may not needed.

    Reference: 1.3.5 - Home | Login separator not visible

    .
    A New Starter again

  9. #9
    Join Date
    Mar 2006
    Location
    Los Angeles
    Posts
    287
    Plugin Contributions
    3

    Default Re: How to add links to header bar without ez-pages

    FYI, the code on the first post is from a previous version of Zen Cart.

    For the latest version you wont see the table tag.

    The code below is the code for the top bar where you see HOME-LOGIN-MYACCOUNT etc etc.

    Code:
    <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>

    WOOPS! clyde already posted this. hehe.

  10. #10
    Join Date
    Sep 2006
    Location
    United Kingdom
    Posts
    195
    Plugin Contributions
    0

    Default Re: How to add links to header bar without ez-pages

    great stuff this thanks it worked a treat
    just 1 question though how can i center the links on the bar???

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. EZ Pages Bar Header Links?
    By autoace in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 15 Sep 2009, 08:10 PM
  2. How do I change links in header/divider bar?
    By visionsfromvoid in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 30 Aug 2009, 06:35 PM
  3. Trying to add header links without breaking my layout
    By lalakerman in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 3 Jul 2008, 08:46 PM
  4. How to add the link on header navigator bar
    By idtags in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 28 Oct 2007, 09:11 PM

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