NavBar links in top and child submenu


#1

I’ve used NavBar to make the menu in a Foundry site. In each page I’ve added some subpages seen as submenus in the NavBar. The question is when you add a submenu the link in the top menu doesn’t go to the page assigned, only the submenus works to the page assigned.
I need to show information linked in each page at the top menu and in the submenus. Is there any solution?.
When exported this works, but just first time you use the top menu, after that only works the submenu links.


#2

Hi @musulungo!

Parent pages, those that have child pages, do not link to any content. They are there to facilitate the drop down menu only.


#3

Thanks for your answer, but do you know if there is any stack or other way to do that in Foundry?
And thanks for Foundry, a very good solution for Rapidweaver. I’m enjoying it.


#4

do you know if there is any stack or other way to do that in Foundry?

If you mean is there a way to have Parent navigation items be linked in the Navigation Bar stack, then no, that is not an option. The Parent navigation items in the Slide Navigation stack retain their links like you’re wanting though.

And thanks for Foundry, a very good solution for Rapidweaver. I’m enjoying it.

Glad to hear you’re enjoying it! :slight_smile:


#5

I have just recently experienced the same navigation issue when I converted my website to Foundry (which I love, btw) - and I wanted to have a link to the parent on my top navigation. My solution was to create a redirect page that I called “Parent Index” and put it to show at the top of the sub menu. I am not sure if there is a better way - but it did the job I wanted. I’d be interested to know if anyone has a better solution.


#6

Hi - having the parent page of child pages as a link to content is essential for the site I’m redesigning so I’m wondering if there’s been any movement on this? Gary’s solution above is clever but won’t be acceptable to my client.


#7

Hi, perhaps this stack: https://store.yuzool.com/de/item/navigation-stack


#8

Hey there @nicksmith

Parent items purposefully do not have links to help ensure they work well with some legacy mobile browsers. While it isn’t strictly necessary of course I had a goal to try and make sure the navigation bar would work with older browsers as navigation is one of those things that will be added to just about every page on a site generally.

It isn’t to rule out the navigation bar ever gaining this feature though. As we move further down the road away from some of the older Android browsers that I was targeting I will revisit this feature, which in on my long-term “list of things.”


#9

Hi Adam - thanks for the more detailed explanation. I can see that the parent item does have a valid link, so I guess that there’s javascript which disables the link for the ‘nav_item parent’ compound selector? Can you let me know where this code is located so that I could modify it?


#10

Modifications to internal code like that isn’t something I provide support for. Sorry. You can modify a stack on your own, but the first update that comes along will undo that modification as stacks updates overwrite the existing files with the new updated files.


#11

Hi Adam - I’ve removed the lines containing .navigation_bar .navigation_container > ul > li > a.parent’).removeAttr(“href”).addClass(‘closed’); from the .js file for each page. This is horribly clunky but none of the other nav options I’ve looked at work well and clickable parent links is a client must have. If you do decide to offer this an option it would also be nice to have the choice of dropdown on rollover.


#12

That would not work properly on mobile devices as mobile devices do not support a ‘hover’ function (since there is no mouse cursor to cause a ‘rollover’ event.

Just know that any update to Foundry will cause this edit to be undone as I mentioned above.


#13

You’ve obviously considered including the option of turning on clickable parents as you’ve left a comment in your javascript: ‘This could be offered as an option possibly’. As you say, I have to do a global search and replace (with wildcards for the pager ID) each time I update - some flexibility from you would certainly be a far more preferable option. And I’m by no means the only person to have requested this


#14

The comment was added in the past as a reminder. As I stated above it is something I’ll continue to monitor going forward based off of mobile browser support. Don’t forget to incorporate some code to make sure your child level navigation items are accessible on mobile devices.


#15

Hi Adam - just to let you know that after wrestling with this for way too long I’ve decided to adopt Gary’s ‘parent index’ solution above. If (and hopefully when) you decide to incorporate this option in an update it will then be a simple matter to transfer the content from the parent index page to the parent page and then delete the parent index page. Thanks for your help


#16

It is definitely not a easy solution to attain what you’re wanting to do without having to give up compatibility with certain browsers and mobile OSes. It is the reason that I settled on the solution I did and have stuck with it so far. It will get revisited at some point, but for now I am deep into a few other projects.


#17

Hi Adam

Been following this thread with great interest, even though Nick has gone down the index route will you still be planning to add in a feature to allow linking to the parent page or will this be quietly forgotten? It will only make Foundry better and my client happy!


#18

It has not been brushed off or forgotten, I simply have other projects I’m currently working on (Foundry based products nonetheless). As I’ve mentioned I will have a look at this again in the future, once I’ve finished up what I’m currently working on.