Jump to content

Archived

This topic is now archived and is closed to further replies.

hansonexperience

First menu item in Navbar not clickable

Recommended Posts

hansonexperience+    8
hansonexperience

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]

Share this post


Link to post
Share on other sites
thebastion    20
thebastion

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.

Share this post


Link to post
Share on other sites
hansonexperience+    8
hansonexperience

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
thebastion    20
thebastion

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

Share this post


Link to post
Share on other sites
Rob    547
Rob

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


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
hansonexperience+    8
hansonexperience

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

Share this post


Link to post
Share on other sites
Rob    547
Rob

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.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
hansonexperience+    8
hansonexperience

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
Rob    547
Rob

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


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
hansonexperience+    8
hansonexperience

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
thebastion    20
thebastion

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
hansonexperience+    8
hansonexperience

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
Donnie Darko    1
Donnie Darko
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')
})

Share this post


Link to post
Share on other sites
hansonexperience+    8
hansonexperience

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
hansonexperience+    8
hansonexperience

Donnie Darko Thx!!

Share this post


Link to post
Share on other sites
Donnie Darko    1
Donnie Darko

 

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 !

  • Like 1

Share this post


Link to post
Share on other sites
Rob    547
Rob

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.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
hansonexperience+    8
hansonexperience

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

Share this post


Link to post
Share on other sites
Rob    547
Rob

Totally!

  • Like 1

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites

  • Similar Content

    • JawDesigns
      By JawDesigns
      Hi everyone,
      Flywheel have reported errors on my clients site 'www.racewaredirect.co.uk' and it's not loading. Can someone please provide some information on how to fix this? The site has never experienced these issues before.
      Thanks,
      James Wilson
    • MissT
      By MissT+
      Hi there,
      I've got an issue with 3 websites built with DMS since I migrated them from http to https that I need help with please.
      When any changes are made - e.g. new posts added or existing posts amended - certain sections of the live site seem to break e.g. image headers hang and don't load (b/g on canvas section), sliders hang and don't load (Revslider), flipper section doesn't load.
      Logging in and then clicking 'Edit the site using DMS' seems to fix the problem. Often if I try to open up another browser window to edit the site / re publish I'm unable to as the page wont load / hangs while trying to load.
      Any ideas how to fix this? On a couple of the sites I've installed a caching plugin as I thought it might be a loading speed issue but it's still happening.
      Website URL's can be provided privately.
      Many thanks in advance.
    • jeomiland
      By jeomiland+
      Hi
      I found this topic
      which talks about a similar issue I am having, but a little different. Hope someone can help me out.
      Best way to see the problem is to view http://cassclayton.com/ on Safari (Mac) compared to Firefox or Chrome. You will see the banner just under the fixed menubar has a gap between the menubar and top of the banner. Looking at Inspector, I found:
      <div class="fixed-top-pusher" style="height: 62px;"></div>
      <script> jQuery('.fixed-top-pusher').height( jQuery('.pl-fixed-top').height() ) </script>
      and indeed it seems the jquery is not always working consistently. For instance, if you simply refresh the page in Safari, it will loose the gap and all looks fine, so is it a browser cache issue that is interacting with the jquery? I do have W3 Total Cache installed. There must be a way to tell the code to make sure jquery is up and running and available to do it's majic?
      And perhaps there is just a better way to do this banner? Originally I tried several DMS sections and used the banner image as background, etc... Kept running into problems with resizing and the left/right parts of the image were getting chopped off. It is important the whole image show, so currently I just use a NextBox section with this code:
      <img src="[pl_site_url]/wp-content/uploads/2015/12/CassClayton-blues-tribute-banner.jpg" width="100%" />
      and it looks the way it should. Is there a better way to place a banner graphic under a fixed navbar and make sure the whole banner graphic displays regardless of screensize?
       
    • oseehys
      By oseehys+
      Hello There,
      So i want to use platform 5 and DMS sections on a single page, i am using a child theme with pinspro as my main theme and i activated platform 5, the only problem am having so far is the fixed option, my navbars are not aligning to their default size, and it will be great if platform 5 header and footer section will function, has anyone used this option, how can i make the best use of platform 5 and DMS on a site
      Cheers
    • kwaoru
      By kwaoru
      Hi,
      I desperately need to deactivate the responsive function on mobile for reasons. It looks so messy with the responsive look on mobile and not navigating or informative at all as it is. 
      I searched for solutions online and tries some of those that I found but nothing worked out. Also I found a previous post on this forum says that this theme pagelines DMS is not meant to be build to deactivate the responsive function... 
      Also tried with widget such as WPtouch to edit the mobile look a little more informative but as I am using "single page" theme on pagelines, the frontpage(main page) never appears on those app.
      Seems like not compatible?
      If there is no way to deactivate responsive function or I'll have to recreate another page just dedicated for a mobile page? or change the theme completely and build a page from scratch?
      I have been searching for this for two days already...
      Could anyone wise and kind out there, please help me?
       
      Thanks,
×