• 0

First menu item in Navbar not clickable


Question

Posted (edited) · Report post

Is this a bug or.....?

 

The first item in a menu when in navbar with dropdowns is not clickable. The link is then blog/#m1 or blog/#m2 or blog/#m3 for the first menu items instead of the link of the menu item (for example a tag or category)

 

[attachment=1384:Schermafbeelding 2013-08-22 om 9.06.33 AM.jpg]

Edited by hansonexperience

Share this post


Link to post
Share on other sites

19 answers to this question

  • 0

Posted (edited) · Report post

hansonexperience it's the default behaviour for bootstrap menus. The only way to avoid it is to get a different menu. I think Ubermenu is apparently quite good with DMS.

Edited by thebastion

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

thebastion hmmm strange because in iblogpro this is not the case. There the first item in menus are clickable.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Does pagelines core use bootstrap? I'm sorry but I've never used it.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Yes, it does.  And you're correct.  That is the default behavior for a menu item with child items below it.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Rob Ok. But the first item is also a page..... 

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Bootstrap doesn't consider that.

 

The solution is easy.  Add a new element under that parent, and make the first child the same page you wanted in the parent. That way, your visitors will see it and be able to link to it in the child level.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Rob what do you mean by element?

In this way:

 

page1 

    page1

    page2

    page 3

 

Because then you see page1 twice

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

You can always relabel one of them by adding the child level page as a custom link.   Sorry. Element = menu link.

 

So

Page 1

   MyPage1

   Page 2

   Page 3

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Rob yes I did similar as you can see on http://www.hansonexperience.com on HAN postings 

But it is not logical. Why is it not recognized as a clickable menu item? 

I iblogpro I did not have this issue.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

hansonexperience well you could go crazy or think outside of the box as they say and change the name of the parent to something different?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

thebastion  :-) Yes i did that already. See my link above. But it takes more steps then necessary now. Thx for helping me.

Share this post


Link to post
Share on other sites
  • 0

Posted (edited) · Report post

My solution is
 
  1. Use child theme
  2. in options Activate dropdowns on hover
  3. copy navbar section from dms (wp-content/themes/dms/sections/navbar) to chid theme sections folder (wp-content/themes/your-child-theme/sections/navbar)
  4. in wp-content/themes/dms/sections/navbar/navbar.js => at rows 17, 18, 19, 22 comment code 
 
jQuery(this).siblings("a")
// .addClass("dropdown-toggle")
// .attr( "href", "#m" + a )
// .attr("data-toggle","dropdown")
.append()
.parent()
//.attr( "id", "m" + a++ )
.addClass("dropdown")
 
jQuery(this)
.find('.sub-menu')
.addClass("dropdown-menu")
.parent()
.addClass('dropdown-submenu')
})
Edited by Donnie Darko

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Donnie Darko Thx for this solution. I have never worked with child themes. How can I do that and what is the advantage?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Donnie Darko Thx!!

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

 

My solution is
 
  1. Use child theme
  2. in options Activate dropdowns on hover
  3. copy navbar section from dms (wp-content/themes/dms/sections/navbar) to chid theme sections folder (wp-content/themes/your-child-theme/sections/navbar)
  4. in wp-content/themes/dms/sections/navbar/navbar.js => at rows 17, 18, 19, 22 comment code 
 
jQuery(this).siblings("a")
// .addClass("dropdown-toggle")
// .attr( "href", "#m" + a )
// .attr("data-toggle","dropdown")
.append()
.parent()
//.attr( "id", "m" + a++ )
.addClass("dropdown")
 
jQuery(this)
.find('.sub-menu')
.addClass("dropdown-menu")
.parent()
.addClass('dropdown-submenu')
})

 

5. Clear browser cache !

1 person likes this

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

In my humble opinion, the best answer is to get Ubermenu as it doesn't use bootstrap, so this is not an issue, and it has more options for styling.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Rob thx I was just looking into Ubermenu. Wow amazing plugin!!

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Totally!

1 person likes this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now