Page 1 of 6 123 ... LastLast
Results 1 to 10 of 55
  1. #1
    Join Date
    Oct 2008
    Location
    newcastle upon tyne (UK)
    Posts
    876
    Plugin Contributions
    2

    Default #categories li a.cat-selected-text but for EZPAGES

    hello...

    im just playing.. but is there a way to make the selected link for an EZpage link bold like how you can a selected category link.

    for example, i use the following for category links
    #categories li a.cat-selected-text {
    color:#990000;
    font-weight:bold;
    padding-left: 0.5em;
    }

    can CSS be used to do the same for links in the EZpages top bar thing, so when a person is looking at that ezpage, the top bar link remains bold or a diff colour etc... if so, how, cos i havent worked it out...

    Cheers
    M

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

    Default Re: #categories li a.cat-selected-text but for EZPAGES

    I've been trying to do that for the EZ Page and other links (Information, etc.) by adapting the code from the Categories box, but have failed so far. It would be a very popular mod, I think.

  3. #3
    Join Date
    Oct 2008
    Location
    newcastle upon tyne (UK)
    Posts
    876
    Plugin Contributions
    2

    Default Re: #categories li a.cat-selected-text but for EZPAGES

    haha.. no wonder i couldnt get it to work then.. my PHP knowledge is less than my understanding of women... and i will never understand them!

    We need a ZC rock n roll star who could create something and name it... oh... EZPage Dressing ;-)

    LOL... Glenn Herbert, was that a good enough shamless hint?

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

    Default Re: #categories li a.cat-selected-text but for EZPAGES

    Sure, it would be possible. The $current_page_base and $_GET['id'] when on an ez-page will allow you to identify if one is active. This can be done in /includes/templates/your_template/templates/tpl_ezpages_bar_header.php, and the link can then be given an "active" classname to style as desired.

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

    Default Re: #categories li a.cat-selected-text but for EZPAGES

    Here you go:

    /includes/templates/your_template/templates/tpl_ezpages_bar_header.php
    PHP Code:
    <?php
    /**
     * Page Template
     *
     * Displays EZ-Pages Header-Bar content.<br />
     *
     * @package templateSystem
     * @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: tpl_ezpages_bar_header.php 3377 2006-04-05 04:43:11Z ajeh $
     * Modified for Ezpages Active Header by Glenn Herbert (gjh42) 2010-06-15
     */

      /**
       * require code to show EZ-Pages list
       */
      
    include(DIR_WS_MODULES zen_get_module_directory('ezpages_bar_header.php'));
    ?>
    <?php 
    if (sizeof($var_linksList) >= 1) { ?>
    <div id="navEZPagesTop">
    <?php for ($i=1$n=sizeof($var_linksList); $i<=$n$i++) {  
      
    $active = ($current_page_base == 'page' and $_GET['id'] == $var_linksList[$i]['id'])? ' class="activeEZPage"''';
      
    ?>
      <a href="<?php echo $var_linksList[$i]['link']; ?>"<?php echo $active?>><?php echo $var_linksList[$i]['name']; ?></a><?php echo ($i $n EZPAGES_SEPARATOR_HEADER '') . "\n"?>
    <?php 
    // end FOR loop ?>
    </div>
    <?php ?>
    Style .activeEZPage {} as desired.
    Note: I haven't tested this yet, so please let me know if anything needs fixing.

    I'll package it up into a proper mod after the festival I'm hosting in two weeks... I'm a bit busy right now:)

  6. #6
    Join Date
    Oct 2008
    Location
    newcastle upon tyne (UK)
    Posts
    876
    Plugin Contributions
    2

    Default Re: #categories li a.cat-selected-text but for EZPAGES

    genius!

  7. #7
    Join Date
    Oct 2008
    Location
    newcastle upon tyne (UK)
    Posts
    876
    Plugin Contributions
    2

    Default Re: #categories li a.cat-selected-text but for EZPAGES

    one tiny thing, if you have the time... how can i style internal links in the EZpage top bar? for example: index.php?main_page=reviews or index.php?main_page=index&cPath=1 etc

    It works great for pages where the content is created in the EZpage editor bit... but no effect on pages that are internally linked... if you get me?

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

    Default Re: #categories li a.cat-selected-text but for EZPAGES

    Right - the ez-pages header can show links to non-ez-pages... that will take a bunch more identification coding... like ten times as much or so:)

    I'll have to look into this when I have more time. There may be an elegant method of doing it, let's hope so anyway.

  9. #9
    Join Date
    Oct 2008
    Location
    newcastle upon tyne (UK)
    Posts
    876
    Plugin Contributions
    2

    Default Re: #categories li a.cat-selected-text but for EZPAGES

    Hi Glenn, when ever you can fit it in is great. Im just pleased it can be done!

    I was just playing about with CSS (killing time) and i had the thought of the ezpages effect like how category dressing can style selected links.

    hope your festival goes well!! thanks for mod!

    Quote Originally Posted by gjh42 View Post
    Right - the ez-pages header can show links to non-ez-pages... that will take a bunch more identification coding... like ten times as much or so:)

    I'll have to look into this when I have more time. There may be an elegant method of doing it, let's hope so anyway.

  10. #10
    Join Date
    Oct 2008
    Location
    newcastle upon tyne (UK)
    Posts
    876
    Plugin Contributions
    2

    help question Re: #categories li a.cat-selected-text but for EZPAGES

    Hello Glenn.

    How was your festival ?

    Did you ever get a chance to look over this idea?
    Any joy? Or would it take far too much changing of loads and loads of files etc?

    Cheers
    M

 

 
Page 1 of 6 123 ... LastLast

Similar Threads

  1. v150 How to display Top Cat & Sub Cat but not Sub Sub Cats??
    By spiggles87 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 5 Mar 2013, 06:37 PM
  2. Replies: 2
    Last Post: 31 Jul 2010, 03:43 PM
  3. Display top-level cat name in text, then sub-cat thumb
    By jfriesen in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 2 Feb 2007, 09:11 PM
  4. Master Cat's on main page, ONLY sub cat's on specific cat pages
    By wtashby in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 25 Jun 2006, 07:24 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