Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: At links redefined

    I really don't know if this will help, but in the PURE_BLACK template produced by a group called zen-cart-power, they have a template file called tpl_top_nav.php that uses a BG image to indicate an AT page.

    So, in their standard header menu, there are links such as "New Products" and the link has a hover background (controlled in the stylesheets)... and when you select the link, the BG image remains "on"... if you see what I mean

    Anyway... here's an example of the PHP they use to create that effect..

    PHP Code:
    <div id="top_nav">
    <div id="tab_nav">
    <!--<div class="top-nav-left"></div>-->
    <div class="top-nav-right"></div>
        <ul class="list-style-none">
            <li class="home-link"><a href="<?php echo '' HTTP_SERVER DIR_WS_CATALOG;?>"><!--img src="images/spacer.gif" width="1" height="14" alt=""--></a></li>

    <?php
    if ($current_page_base == 'products_new') {    $active    'tab_active'
        } else { 
    $active '';
    }
    ?>
            <li id="<?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 id="<?php echo $active;?>"><a href="index.php?main_page=specials"><?php echo TOP_MENU_SPECIALS;?></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 id="<?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 id="<?php echo $active;?>"><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART'''NONSSL'); ?>"><?php echo TOP_MENU_VIEW_CART;?></a></li>
        </ul>
    </div>
    Please note... this is CUSTOM code from zen-cart-power and is possibly subject to copyright.
    20 years a Zencart User

  2. #2
    Join Date
    May 2010
    Posts
    5
    Plugin Contributions
    0

    Default Re: At links redefined

    Thank both of you for the help, still no solution, I'm currently working (and having a helluva time) on descendant, child, adjacent selectors, using every possible combination. I can bold them all this way but not just one (problem with adjacent). I'll post final solution, if you have any more suggestions I'll check them out.
    -webman

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

    Default Re: At links redefined

    Say you want to bold only the third link.
    Code:
    #navSupp ul li a {font-weight: normal;} 
    #navSupp ul li+li+li a {font-weight: bold;} 
    #navSupp ul li+li+li+li a {font-weight: normal;}
    The four li rule will apply to the fourth and following items.

  4. #4
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: At links redefined

    Quote Originally Posted by gjh42 View Post
    Say you want to bold only the third link.
    Code:
    #navSupp ul li a {font-weight: normal;} 
    #navSupp ul li+li+li a {font-weight: bold;} 
    #navSupp ul li+li+li+li a {font-weight: normal;}
    The four li rule will apply to the fourth and following items.
    Glenn... your superior brain just astounds me sometimes.. such an elegant solution!
    20 years a Zencart User

 

 

Similar Threads

  1. how to delete/add links in the footer?
    By musclecomp in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 22 Aug 2011, 08:16 PM
  2. How to change links at the top of the page & in the footer
    By sc436 in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 31 Jan 2011, 08:47 PM
  3. Help! How to change the footer? Links inside!
    By Xandrouz in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 21 Dec 2009, 10:22 PM
  4. how to make Links in menu bold when on there page?
    By jamesdavid in forum General Questions
    Replies: 0
    Last Post: 8 Jun 2008, 11:11 AM
  5. How can I get rid of links in the footer
    By Marlake in forum Customization from the Admin
    Replies: 6
    Last Post: 29 Apr 2008, 04:49 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