Main Nav with scroll-to-block targeting a different page


I am working on a site that has a home page and a few internal pages. The main navigation targets blocks in the home page, featuring a smooth scroll effect. The navigation works great when you are in the home page, but breaks when you are using the main nav from an internal page. I have been able to fix this editing the HTML (adding index.php#MyBloc), but I am wondering if there is a more reliable way to do this, so I don’t have to edit the raw HTML every time I export a site update.



If I am following what you are saying, does this older thread help?
(Note: disregard the bug talk that was fixed in 2.1.1)

You could use: Interactions > Navigate to URL – and include an anchor reference to target.

1 Like

Well, this does help as the menu will keep the page reference across the site. Thanks for the suggestion! There is one side effect, tho, we lose the scroll animation.

Well, it can be done, just not presently natively with Blocs. Google: scrollto div different page. You will there find examples using mostly hashtags, some with cookies, etc., You would need to modify the exported Blocs source code accordingly yourself to add such features.