Jump to content
J_Szwarga

Remove menu dropdown-toggle from children

Recommended Posts

Rookie Question Alert:

Attached is my piece of code from my _main.php.

What do I need to do in this section of my code to remove the dropdown-toggle from the grandchildren of "Home" in my menu?

I don't want to remove the toggles from Home's children, but their children I do. 

if($child->numChildren > 0 && $child->url <> "/"){
        $class .= " dropdown-toggle ";
    }
    if($page == $child){
        $class .= " active ";
    }
    elseif ($page->parents->has($child) && $child->url <> "/") {
        $class .= " active ";
    }

code.png

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...