The Navbar and subdirectory

If you move a page to a subdirectory, the Navbar is not updated. All other links on the page in the subdirectory are updated but not the Navbar. The same whether it is a linked Navbar or not. All links that are linked back have a ../ in front of the link except in the Navbar. I mean if I write a link to index.html on a page and move that page to a subdirectory. That link works when the page is moved to a subdirectory and looks like this ../index.html, but the same link in the Navbar doesn't work and will still looks like this index.html

1 Like

I have to ask this only because I use custom nav bars due to the need of multi level dropdowns, so ... are you using a custom nav bar or the default that the app creates from the components list?

I use a default nav bar . You can replicate the bug make a new design. Choose Material Portfolio then create a new folder in the pages panel and move two pages to the new folder. check the links in the nav bar move one page back to the root folder. Now it start to go wrong with the links in the nav bar

I still have the same problem. Any progress til now? If not, does anyone have a solution, or fix? I tried absolute links, which works, but obviosuly breaks the local preview feature which is super sad.

Cheers

You will probably have to wait on a Dev to answer this because not too long ago they had updated the link setups so that when you moved things they were supposed to update the links.

What I "can" tell you is that if you don't want the links to update you have to tell it that when you move the pages. That's the only thing I'm aware of that you can do upon moving pages to subfolders. Other than that, if the links are messed up, it is probably something they will need to look at your project file for etc. You may want to opt to put a ticket in rather than waiting on the forums.

If you do put a ticket in, would you please come back here and let us know what the situation is/was? Thanks ahead of time.

Sorry for entering this discussion so late! If the navbar is linked between multiple pages, I am afraid that it will show up exactly the same on all of them. This means that if a page is placed in a subfolder, the links will have to be absolute (with leading slashes: /contact.html, /products/something.html etc) for the navbar to work the same on all pages.

If the navbar is not linked and the links aren't updated when you move the page in a directory, this would be a bug.

1 Like

The other option is to unlink the navbar in one of the pages within the subdirectory, edit the links how you need them so they will go to the right place, now copy that menu and paste linked and replace the menu in the other pages in that subdirectory. It's not a perfect solution, but it works pretty well for me so far. In the end it's only 2 menus that have to be updated and only one one page each so it's still a super time saver than it would be if you had to alter every page in the subdirectory and not use linked components for any subdirectory pages :)

Note: An easier way would be to start with a page that's in the main directory, unlink "that" nav and move the page to the subdirectory so the links will automatically update for you. Now use that one as the main one for the subdirectory and do the paste linked to the other pages in the subdirectory (delete the old menu of course).

Looks like it isn’t fixed yet. Is it already reported as a bug?