You are here: Pixo Point Support Forum » General Category » Menus » Permalink cuts Multi-Level-Navigations classes

Author Topic: Permalink cuts Multi-Level-Navigations classes  (Read 928 times)

haggis

  • Newbie
  • *
  • Posts: 6
Permalink cuts Multi-Level-Navigations classes
« on: January 30, 2009, 07:31:50 AM »
  • Reply with quote
Hello!
I'm using version 1.6
You can see the site without permalinks at www.ikum.de and at 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
Logged

Ryan

  • Administrator
  • Hero Member
  • *****
  • Posts: 3799
    • WWW
Re: Permalink cuts Multi-Level-Navigations classes
« Reply #1 on: January 30, 2009, 08:14:58 AM »
  • Reply with quote
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.
Logged
Available for paid work. Either sign up for Premium Support or use our Contact Page for more information.

haggis

  • Newbie
  • *
  • Posts: 6
Re: Permalink cuts Multi-Level-Navigations classes
« Reply #2 on: January 30, 2009, 07:00:21 PM »
  • Reply with quote
ok, here's the fix:

Code: [Select]
function pages() {echo '', ereg_replace("\"><a [^<]+</a>([\t\n]+)<ul"," haschildren\\0",wp_list_pages('title_li=&exclude='. get_option('suckerfish_excludepages').'&echo=0')) , '';}
-> [^<] instead of [/\?a-zA-Z0-9\-\.\:\"\=\_ >]
but I think the old regexp should have matched, too:

Code: [Select]
regexp: \"><a [/\?a-zA-Z0-9\-\.\:\"\=\_ >]+</a>([\t\n]+)<ul
string: "><a href="http://example.com/index.php/page-name/" title="some title?">Some title?</a><ul

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: [Select]
<!--//--><![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);//--><!]]>

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

Hope this will help someone!
« Last Edit: January 30, 2009, 07:03:02 PM by haggis »
Logged

Ryan

  • Administrator
  • Hero Member
  • *****
  • Posts: 3799
    • WWW
Re: Permalink cuts Multi-Level-Navigations classes
« Reply #3 on: January 30, 2009, 07:50:01 PM »
  • Reply with quote
Thanks for the code improvement :) 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?
Logged
Available for paid work. Either sign up for Premium Support or use our Contact Page for more information.

haggis

  • Newbie
  • *
  • Posts: 6
Re: Permalink cuts Multi-Level-Navigations classes
« Reply #4 on: January 30, 2009, 08:49:47 PM »
  • Reply with quote
You scratch my back and I'll scratch yours. :)

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

Ryan

  • Administrator
  • Hero Member
  • *****
  • Posts: 3799
    • WWW
Re: Permalink cuts Multi-Level-Navigations classes
« Reply #5 on: February 07, 2009, 05:47:28 PM »
  • Reply with quote
Just post back here when you so and I'll be happy to add a link for you :)

Logged
Available for paid work. Either sign up for Premium Support or use our Contact Page for more information.

haggis

  • Newbie
  • *
  • Posts: 6
Re: Permalink cuts Multi-Level-Navigations classes
« Reply #6 on: February 09, 2009, 09:32:35 PM »
  • Reply with quote
Hi Ryan!
Have a site since yesterday! But it's still under construction ;)
My first post was about your navigation plugin, so feel honored *g*

www.mindf.org

Greetz
Haggis
Logged

Ryan

  • Administrator
  • Hero Member
  • *****
  • Posts: 3799
    • WWW
Re: Permalink cuts Multi-Level-Navigations classes
« Reply #7 on: February 10, 2009, 03:52:00 AM »
  • Reply with quote
Thank you :)

Logged
Available for paid work. Either sign up for Premium Support or use our Contact Page for more information.
 

+ Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.
Name: Email:

Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC | DSv4 Design by DzinerStudio