Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2010
    Location
    Illinois
    Posts
    33
    Plugin Contributions
    0

    Default Images for the Nav links

    I am wondering if it's possible to replace the text in the Nav Menu with images that would match the font in my header. I did manage to increase the size on the links (upper right).

    www.battlefrontgames.biz

    I know I am limited to just a few standard fonts so I think a graphic is the only other way to go.

    Any ideas?

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Images for the Nav links

    The links are output by /includes/templates/your_template/common/tpl_header.php. Unless the output constants are used elsewhere, you can rework the defines to be HTML images instead of text. Any that are used elsewhere would have to be hard-coded in tpl_header.php, or new constant names created there and defined in a language file.
    PHP Code:
    <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>
    HEADER_TITLE_CATALOG
    HEADER_TITLE_LOGOFF
    HEADER_TITLE_MY_ACCOUNT
    HEADER_TITLE_LOGIN
    HEADER_TITLE_CART_CONTENTS
    HEADER_TITLE_CHECKOUT

    are the constants to check. If they are not used elsewhere, you can redefine them as images.

  3. #3
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Images for the Nav links

    HEADER_TITLE_CATALOG is used in the footer and breadcrumbs as well as the header, so create a new constant HEADER_TITLE_CATALOG_IMG to use in the header.
    PHP Code:
        <ul class="back">
        <li><?php echo '<a href="' HTTP_SERVER DIR_WS_CATALOG '">'?><?php echo HEADER_TITLE_CATALOG_IMG?></a></li>
    In /includes/languages/english/your_template/header.php, add the new define below the original:
    PHP Code:
      define('HEADER_TITLE_CATALOG''Home');
      
    define('HEADER_TITLE_CATALOG_IMG'zen_image(DIR_WS_TEMPLATE 'buttons/' $_SESSION['language'] . '/headernav_home.gif')); 
    Save the image as /includes/templates/your_template/buttons/english/headernav_home.gif.
    (This allows other languages to be used easily.)

    You can use the same method for any others you need to redo.

  4. #4
    Join Date
    Aug 2010
    Location
    Illinois
    Posts
    33
    Plugin Contributions
    0

    Default Re: Images for the Nav links

    Ok, I'm on it.

    Thanks for the quick reply.

 

 

Similar Threads

  1. Align nav links to the right?
    By ebaobao in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 9 Aug 2011, 04:11 AM
  2. Adding links to the main (top) nav
    By ktomas in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 26 Jul 2009, 09:52 PM
  3. How do I edit the nav links for ez-pages
    By fuzzyevolution in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 11 May 2008, 12:20 PM
  4. have a question about main nav.. - can I use images for the links?
    By Pariseau in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 3 Apr 2008, 04:29 PM
  5. Still trying to change the color of nav links!
    By ssbeats in forum General Questions
    Replies: 8
    Last Post: 15 Jan 2008, 10:33 PM

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