Page 2 of 6 FirstFirst 1234 ... LastLast
Results 11 to 20 of 55
  1. #11
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

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

    It would not require touching any additional files, just more code in the one. I think the Smart Backgrounds code would serve as a starter, with sub-tests... maybe need to include a specific line for each possible pagename, or maybe there is a universal way I can phrase it that will work with all names. I have this thread bookmarked now, and will look into it.

  2. #12
    Join Date
    Feb 2007
    Location
    New York
    Posts
    88
    Plugin Contributions
    0

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

    Hi Glenn,

    Have you ever figured out how to style selected link in ezpages sidebox? I'd really love to know how to do that. Could you help?? This is quite urgent.. Thank you!

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

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

    I haven't worked on the "internal link" highlighting, but the code I gave above should already work for ez-page links.

  4. #14
    Join Date
    Feb 2007
    Location
    New York
    Posts
    88
    Plugin Contributions
    0

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

    Glenn,

    The situation is I don't have any sidebox other than ezpage sidebox. I have home page, contact us page , etc. set up in ezpage sidebox, so the code you mentioned doesn't help..

    Do you have any idea when you'll be able to look into it (internal links)?

    Thank you in advance!

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

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

    OK, I see your predicament. I'll take a quick look at it now to really see what kind of a job it is. If it's simple enough, I'll post some code for you to test.

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

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

    It looks like I should have the ez-pages header version ready to test in a few minutes. If that works, it shouldn't be hard to translate into the sidebox.

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

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

    Please test this to see how it works.
    /includes/templates/your_template/templates/tpl_ezpages_bar_header.php
    Style the classes
    .activeEZPage {}
    and
    .activeILPage {}
    in your stylesheet to see effects.
    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-08-20
     */

      /**
       * 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 '';
      if(
    $current_page_base == 'page') { 
        
    $active = ($_GET['id'] == $var_linksList[$i]['id'])? ' class="activeEZPage"''';
      }elseif (
    $var_linksList[$i]['altURL']) {//check for current page in alturl
        
    $active = (strstr($var_linksList[$i]['altURL'],'main_page=' $current_page_base))?' class="activeILPage"''';
      } 
    ?>
      <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 ?>

  8. #18
    Join Date
    Feb 2007
    Location
    New York
    Posts
    88
    Plugin Contributions
    0

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

    Thank you very much for your help, Glenn.

    It works for certain page but not all. Please see link below:
    http://tinyurl.com/2c4jabc

    "testimonials" works, but for "home" and "about us", it doesn't. Any clue why??

    Thanks again for your effort. I really appreciate it!

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

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

    The home link is easy - that doesn't include a "main_page=" part, so is not being picked up. I can add a special check for that case.

    The about us is puzzling, as it is an ez-page and essentially the same code apparently worked for Shane78. It would be helpful if you could add some debug code so we can see exactly what is happening there.
    PHP Code:
    <?php for ($i=1$n=sizeof($var_linksList); $i<=$n$i++) { 
      
    $active '';
      if(
    $current_page_base == 'page') { 
        
    $active = ($_GET['id'] == $var_linksList[$i]['id'])? ' class="activeEZPage"''';
    Change to
    PHP Code:
    <?php for ($i=1$n=sizeof($var_linksList); $i<=$n$i++) { 
      echo 
    ' $i='.$i.' current page='.$current_page_base;//debug
      
    $active '';
      if(
    $current_page_base == 'page') { 
        echo 
    ' id='.$_GET['id'].' listid='.$var_linksList[$i]['id'];//debug
        
    $active = ($_GET['id'] == $var_linksList[$i]['id'])? ' class="activeEZPage"''';
    This will output a line of text above the ez-page bar. Let me know when you have activated the debug code and I will look at it.

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

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

    Change
    PHP Code:
      }elseif ($var_linksList[$i]['altURL']) {//check for current page in alturl
        
    $active = (strstr($var_linksList[$i]['altURL'],'main_page=' $current_page_base))?' class="activeILPage"''';
      } 
    ?> 
    to
    PHP Code:
      }elseif ($var_linksList[$i]['altURL']) {//check for current page in alturl
        
    $active = (strstr($var_linksList[$i]['altURL'],'main_page=' $current_page_base) or ((strstr($var_linksList[$i]['altURL'],'/index.php') == '/index.php') and ($current_page_base == 'index')))?' class="activeILPage"''';
      } 
    ?> 
    This may still be subject to false positives with certain kinds of custom page names, so I will work on tightening it up; meanwhile this should work for common pages.

 

 
Page 2 of 6 FirstFirst 1234 ... 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