Results 1 to 10 of 10
  1. #1
    Join Date
    Jun 2009
    Posts
    37
    Plugin Contributions
    0

    Default Template html help

    Hello all,

    I have a small problem (which I know will be an easy fix for the gurus).

    I am using a template which is great but one small thing is bugging me.

    The bar that sits under the main photo has all the links left hand justified rather than centred.

    My website can be viewed at: www.colourpatch.com.au to see what I mean.

    I managed to find the relevant file where the code is located (posted below).

    Can someone advise what I need to change to centralise the links?

    Thanks in advance,

    Phil

    .....

    <?php
    /**
    * Template designed by 12leaves.com
    * 12leaves.com - Free ecommerce templates and design services
    *
    * @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: index.php 6550 2007-07-05 03:54:54Z drbyte $
    */

    ?>

    <div id="top_nav">

    <div id="tab_nav">
    <ul class="list-style-none">
    <li class="home-link"><a href="<?php echo '' . HTTP_SERVER . DIR_WS_CATALOG;?>"><?php echo TOP_MENU_HOME;?></a></li>

    <?php
    if ($current_page_base == 'products_new') { $active = 'tab_active';
    } else { $active = '';
    }?>
    <li class="<?php echo $active;?>"><a href="index.php?main_page=products_new"><?php echo TOP_MENU_NEW_PRODUCTS;?></a></li>

    <?php
    if ($current_page_base == 'specials') { $active = 'tab_active';
    } else { $active = '';
    }?>
    <li class="<?php echo $active;?>"><a href="index.php?main_page=specials"><?php echo TOP_MENU_SPECIALS;?></a></li>

    <?php
    if ($current_page_base == 'featured_products') { $active = 'tab_active';
    } else { $active = '';
    }?>
    <li class="<?php echo $active;?>"><a href="index.php?main_page=featured_products"><?php echo TOP_MENU_FEATURED_PRODUCTS;?></a></li>

    <?php
    if ($current_page_base == 'postage_options') { $active = 'tab_active';
    } else { $active = '';
    }?>
    <li class="<?php echo $active;?>"><a href="index.php?main_page=index&cPath=45"><?php echo postage_options;?></a></li>

    <?php
    if ($current_page_base == 'account' || $current_page_base == 'login' || $current_page_base == 'account_edit' || $current_page_base == 'address_book' || $current_page_base == 'account_password' || $current_page_base == 'account_newsletters' || $current_page_base == 'account_notifications') { $active = 'tab_active';
    } else { $active = '';
    }?>
    <li class="<?php echo $active;?>"><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo TOP_MENU_MY_ACCOUNT;?></a></li>

    <?php
    if ($current_page_base == 'shopping_cart') { $active = 'tab_active';
    } else { $active = '';
    }?>
    <li class="<?php echo $active;?>"><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo TOP_MENU_VIEW_CART;?></a></li>
    </ul>
    </div>

    <!-- Languages/currency -->
    <div class="languages-wrapper float-right">
    <?php
    $languges_object = new language;
    if (count ($languges_object->catalog_languages) > 1){
    ?>
    <div class="languages float-right">

    <?php require($template->get_template_dir('tpl_languages_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_languages_header.php'); ?>

    <div id="langPopup" class="popup popup-win hidden">
    <img class="close-pic float-right" src="<?php echo ($template->get_template_dir('', DIR_WS_TEMPLATE, $current_page_base,'images'). '/close_pic.gif'); ?>" alt="close" />
    <?php require(DIR_WS_MODULES . zen_get_module_directory('header_languages.php')); ?>
    </div>
    </div>
    <?php
    }
    ?>
    <?php
    if (isset($currencies) && is_object($currencies) && count ($currencies->currencies) > 1){
    ?>
    <div class="currency float-right">
    <?php require($template->get_template_dir('tpl_currency_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_currency_header.php'); ?>

    <div id="currPopup" class="popup popup-win hidden">
    <img id="close-pic" class="close-pic float-right" src="<?php echo ($template->get_template_dir('', DIR_WS_TEMPLATE, $current_page_base,'images'). '/close_pic.gif'); ?>" alt="close" />
    <ul class="list-popup">
    <?php foreach ($currencies_array_popup as $k=>$v) { ?>

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: Template html help

    You should be able to add something like this in stylesheet.css:

    #tab_nav li {
    float: left;
    border-right: 1px solid #5e5e5e;
    padding: 0 0 0 5px;
    margin-left: .7em
    }

  3. #3
    Join Date
    Jun 2009
    Posts
    37
    Plugin Contributions
    0

    Default Re: Template html help

    Thanks Stevesh.

    Will give it a try and see how it goes.

    Phil

  4. #4
    Join Date
    Jun 2009
    Posts
    37
    Plugin Contributions
    0

    Default Re: Template html help

    Stevesh,

    Worked a treat!
    (Though I bumped it upto 1.5 and it centred beautifully).

    I have uncovered another 'irk' in the code.

    I added a new link: 'postage options' to the bar. However if I compose the code the same as the one above it (Featured Products) for example the resulting display is 'TOP_MENU_POSTAGE_OPTIONS'?
    AS you can see from below I got it to work, but it displays now as Postage_Options (which works but doesn't look as neat.

    What have I screwed up??

    Phil

    <?php
    if ($current_page_base == 'featured_products') { $active = 'tab_active';
    } else { $active = '';
    }?>
    <li class="<?php echo $active;?>"><a href="index.php?main_page=featured_products"><?php echo TOP_MENU_FEATURED_PRODUCTS;?></a></li>

    <?php
    if ($current_page_base == 'postage_options') { $active = 'tab_active';
    } else { $active = '';
    }?>
    <li class="<?php echo $active;?>"><a href="index.php?main_page=index&cPath=45"><?php echo postage_options;?></a></li>

  5. #5
    Join Date
    May 2010
    Location
    WA State
    Posts
    1,678
    Plugin Contributions
    3

    Default Re: Template html help

    Download includes/languages/english/your_template/header.php. Open it and find this section:

    // top navigation menu text

    Add this:

    define('TOP_MENU_POSTAGE_OPTIONS', 'Postage Options');

    Save it and re-upload it. Note: Backup the original first.

  6. #6
    Join Date
    Jun 2009
    Posts
    37
    Plugin Contributions
    0

    Default Re: Template html help

    Perfect!!

    Thanks very much..

    Phil

  7. #7
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,263
    Plugin Contributions
    3

    Default Re: Template html help

    We've used this template as well, and it does not validate at W3, because of the empty } else { $active = ''; condition.

    And as this strips in an ID, you will need to create a unique ID for every instance where it is empty...

    EG:
    } else { $active = 'tab_not_active_1';
    } else { $active = 'tab_not_active_2';
    } else { $active = 'tab_not_active_3';
    } else { $active = 'tab_not_active_4'; ...etc

    Then it should validate OK.

    (You cannot declare an ID... then leave it blank.)
    20 years a Zencart User

  8. #8
    Join Date
    Jun 2009
    Posts
    37
    Plugin Contributions
    0

    Default Re: Template html help

    Schoolboy, many thanks.

    However, I did as was suggested by RescoCCC and it worked perfectly.

    Phil

  9. #9
    Join Date
    May 2010
    Location
    WA State
    Posts
    1,678
    Plugin Contributions
    3

    Default Re: Template html help

    Quote Originally Posted by phiblack View Post
    Schoolboy, many thanks.

    However, I did as was suggested by RescoCCC and it worked perfectly.

    Phil
    He's actually pointing out a different issue. Run your site through this tool and you'll get an idea of what he's talking about:

    http://validator.w3.org

  10. #10
    Join Date
    Jun 2009
    Posts
    37
    Plugin Contributions
    0

    Default Re: Template html help

    Great Scott!!

    I see what you mean....

    Thank you all. Looks like some more reading and adjusting for me.

    Phil

 

 

Similar Threads

  1. need help creating HTML newsletters to match my store template
    By picandnix in forum General Questions
    Replies: 4
    Last Post: 12 May 2011, 11:57 PM
  2. Help needed for the "Tell-a-friend" HTML email template.
    By Athens Collectibles in forum Managing Customers and Orders
    Replies: 2
    Last Post: 4 Nov 2010, 10:08 PM
  3. HTML Email template
    By MaryF in forum General Questions
    Replies: 3
    Last Post: 3 Mar 2009, 11:30 AM
  4. HTML/CSS Template
    By dvdd127 in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 29 Dec 2008, 09:30 PM
  5. Replies: 2
    Last Post: 11 Jan 2008, 10:53 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR