Permalink cuts Multi-Level-Navigations classes

Forums Forums Menus Permalink cuts Multi-Level-Navigations classes

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #601
    haggis
    Member

    Hello!
    I’m using version 1.6
    You can see the site without permalinks at http://www.ikum.de and at http://www.stuermi.com/wordpress with permalinks activated.

    As you can see, navigation elements with children have i.e the class "page_item page-item-7 haschildren".
    But with permalinks activated it’s "page_item page-item-7". So I have no way to give the haschildren-elements a special style.
    I’m not able to locate the problem. All CSS-files are reacheable.

    Is any workaround out there?

    Thx,
    Haggis

    #5129

    No idea sorry. The haschildren CSS class is just a preliminary feature at this stage. We haven’t even started integrating support for it into the CSS generator.

    If you figure out where your problem is I’d love to hear about how you fixed it.

    #5130
    haggis
    Member

    ok, here’s the fix:

    [code:2ccdve26]
    function pages() {echo ”, ereg_replace(""><a [^<]+</a>([tn]+)<ul"," haschildren\0",wp_list_pages(‘title_li=&exclude=’. get_option(‘suckerfish_excludepages’).’&echo=0′)) , ”;}
    [/code:2ccdve26]
    -> [^<] instead of [/?a-zA-Z0-9-.:"=_ >]
    but I think the old regexp should have matched, too:

    [code:2ccdve26]
    regexp: "><a [/?a-zA-Z0-9-.:"=_ >]+</a>([tn]+)<ul
    string: "><a href="http://example.com/index.php/page-name/" title="some title?">Some title?</a><ul
    [/code:2ccdve26]

    Anyway, to style an element with childs you can use "#suckerfishnav li:hover.haschildren" for all browsers except IE<=6

    To do so you have to expand the suckerfish_ie.js in a way like this:

    [code:2ccdve26]
    <!–//–><![CDATA[//><!–
    sfHover = function() {
    var sfEls = document.getElementById("suckerfishnav").getElementsByTagName("li");
    for (var i=0; i<sfEls.length; i++) {
    sfEls[i].onmouseover=function() {
      if((this.className.search(/haschildren/)) != -1) {
        this.className+="sfhover";
      } else {
        this.className+=" sfhover";
      }
    }
    sfEls[i].onmouseout=function() {
    this.className=this.className.replace(new RegExp(" sfhover\b"), "");
    this.className=this.className.replace(/sfhover/, "");
    }
    }
    }
    if (window.attachEvent) window.attachEvent("onload", sfHover);//–><!]]>
    [/code:2ccdve26]

    Now you can style these elements in a "style_ie6_fixes.css" with "#suckerfishnav li.haschildrensfhover"

    Hope this will help someone!

    #5131

    Thanks for the code improvement <img decoding=” title=”Smiley” /> I’ll add this to my list of future improvements.

    Do you have a website you would like linked to in the credits for the plugin?

    #5132
    haggis
    Member

    You scratch my back and I’ll scratch yours. <img decoding=” title=”Smiley” />

    Unfortunately I haven’t got a personal website yet. Thanks for asking!

    #5133

    Just post back here when you so and I’ll be happy to add a link for you <img decoding=” title=”Smiley” />

    #5134
    haggis
    Member

    Hi Ryan!
    Have a site since yesterday! But it’s still under construction <img decoding=” title=”Wink” />
    My first post was about your navigation plugin, so feel honored *g*

    http://www.mindf.org

    Greetz
    Haggis

    #5135

    Thank you <img decoding=” title=”Smiley” />

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.