Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2012
    Posts
    8
    Plugin Contributions
    0

    Default EZPages and Header Navigator Menu

    Hello,

    Thank you in advance for taking time to read my post. I am currently using version 1.39h. I did not build this site, I have taken it over and am just trying to maintain it and keep business flowing while I re-vamp and build a new store from scratch.

    If you visit the site, you will see that it is totally dis-organized, but that is to change. But, what I HAVE done to the site is move to another host. I backed up the old site, and just uploaded it via FTP to the new host. No upgrades, just installed the same version of ZC, and with whatever mods were already there.

    I know it was built with a template, but I do not believe this is specifically a template issue, but I could be wrong.

    My issue: The client added two new categories, Christmas Specials and Limited Stock, which they wanted a link on the main page. I went into the Admin, went to EZ Pages, and created a new file for each and have the header enabled and the sort order defined, and inserted an internal link. This all went well. The issue is on the main page. The tabs are supposed to change to orange when you hover, with the first one (Katrina's Box) always being orange. However, after adding the two pages, their heading also stays orange, not just on hover. If you click on any menu tab , it will take you to the appropriate page and only the category you are in stays orange as it is supposed to. This only happens on the main page.

    I have used FireBug, and have determined that there is one word that needs to be edited out, if I could only find where to access this bit of code. I have gone through all of the files, (well, maybe not all since I haven't found it yet). I have searched the forums and faq's and found the EZ Pages are stored in the db. I found them in the db but not the code I was looking for.

    <li class="selected ">
    <a href="http://katrinasbox. com/index.php?main_page=index&cPath=323">
    <span>
    <span>Christmas Specials</span>
    </span>
    </a>
    </li>

    This is what I am trying to edit, and all I need to do is delete the word 'selected' for Christmas Specials and for Limited Stock. Not sure why EZPages added it, but I need to access it somehow. So, if anyone knows either where I might find it or a way to edit this, that would be awesome.

    Or, perhaps it was how the categories were created, not sure. I have tried comparing various details of the other tabbed pages, but cannot discern any differences other than names and sort order.

    The site link is listed in the code above.

    Thank You,
    Jeremiah

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

    Default Re: EZPages and Header Navigator Menu

    We need to see the site to begin to know what has been set up already. The default ez-pages menus don't have any facility for identifying the selected page.

    Oops - just saw your comment about the site link... back soon:)

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

    Default Re: EZPages and Header Navigator Menu

    It's always difficult to determine exactly how Template Monster has messed things up, but I would use the Admin - Tools - Developers Tool Kit to search for navezpagestop. I'd guess they put that list in includes/templates/theme511/common/tpl_header.php.

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

    Default Re: EZPages and Header Navigator Menu

    Okay, you have a Template Monster template. In case you didn't know, they are notorious for mangling stock Zen Cart functionality to get the particular look/behavior they want in a template.
    The ez-pages header has been customized by them, so we need to see (probably) /includes/modules/theme511/ezpages_bar_header.php. Post it in PHP forum tags for easier comprehension (icon above).

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

    Default Re: EZPages and Header Navigator Menu

    If there is not an ezpages_bar_header.php file in the custom folder, try /includes/templates/theme511/templates/tpl_ezpages_bar_header.php, or tpl_header.php.

  6. #6
    Join Date
    Sep 2012
    Posts
    8
    Plugin Contributions
    0

    Have a Drink Re: EZPages and Header Navigator Menu

    Thank you both.gjh42 and stevesh, for responding so quickly. I knew it was a template, and though I am not too familiar with EZPages, I also know that sometimes those "do it for you wizards" like to "help" you out and put things in "for" you. And I had looked at the tpl_ezpages_bar_header.php, but I guess I didn't know what to look for, I was looking for something more specific, I was looking for the line of code I saw with FireBug. And I had tried the DEV Tools, but, once again, I was not looking for the right thing, I was looking for specific words such as Christmas and Limited Stock, and was coming up empty handed.
    I used the DEV tools and looked for navezpagestop (though I thought it was ez page stop, and it was ez pages top)
    and only one file came up 4 times-includes/templates/theme511/templates/tpl_ezpages_bar_header.php. I opened the file, 'selected' was there.

    div id="navEZPagesTop">
    <ul>
    <?php
    $count = 1;
    foreach($var_linksList as $list) {
    $link_list = substr($list['link'], strrpos($list['link'], '/'));
    $link_referer = str_replace('&', '&amp;', $_SERVER['REQUEST_URI']);
    $link_referer = substr($link_referer, strrpos($link_referer, '/'));


    if($link_list == $link_referer){
    $class = 'selected';
    }else{
    $class = '';
    }
    if($this_is_home_page && strpos($link_list, 'main_page=index')){
    $class = 'selected'; (this is the one I removed)

    And, yes, I agree TM certainly messes things up, however, so did the person that had this site before me, and I had no idea what was his doings and what was TM's fault.

    So, thank you, as I have been up all night trying to find it, don't know if I would have ever found it on my own.

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

    Default Re: EZPages and Header Navigator Menu

    if($this_is_home_page && strpos($link_list, 'main_page=index')){
    $class = 'selected'; (this is the one I removed)
    This bit of code you posted will make any category or product listing page link show as selected. It is sloppily constructed to make the Home link selected on the homepage, but also catches other "index" pages (all category/product listings). This didn't occur to them because they just wanted their predefined menu links to work correctly. You may be able to fix the function instead of deleting it with this:

    if($this_is_home_page && strpos($link_list, 'main_page=index') && !strpos($link_list, 'cPath=')){

    which will filter out links pointing to listing pages.


    EZ-Pages Improved Menus has code that correctly highlights the current page link if it is in the list, for all possible pages as far as I know.

 

 

Similar Threads

  1. How to use ezpages/categories as dropdown menu in the header?
    By mdivk in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 21 Dec 2011, 06:32 PM
  2. EZPages Header menu
    By Rob905 in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 1 Jul 2009, 05:00 PM
  3. Easy way to edit header/top menu, footer menu, and sidebar menu?
    By templar2 in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 30 Jun 2009, 11:14 AM
  4. Header image covers Categories Tab Menu & EZPages
    By neszz in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 23 Aug 2008, 06:02 PM
  5. Centering EZPages Nav. Menu in Header
    By liebling in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 15 Jul 2008, 11:26 AM

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