Nav scroll to target on a different page that doesn't have the target

I have a nav link that scrolls to target bloc on the homepage. However, on a different page clicking on the nav link it doesn’t do anything. I’d like for it to redirect to the homepage and then automatically scroll to the target. Is this possible?

@Moody Are you using the Menu manager or doing the menus manually?

One way to link to a page and a specific block on that page is to give your destination page and target bloc an Id and set the link to be URL and "destination.html#target"
Where destination.html and target of course is what ever you use :slight_smile:

1 Like

@Jakerlund I’m doing the menus manually. Did not set to primary because I needed to include a button in the menu. Would that method work?
Also how can I preview the navigate to URL method without a web address as I’m previewing my website in Chrome.

@Moody If you have lets say three pages (Home, page1, page2) and a link from home should go to page2 and to the bottom bloc called info.
Open page2 and give that bloc the Id “info” and from the menu on your home page set it to go to url and page2.html#info
It should work with preview in browser (ALT+CMD+B) or export and test.
If that is what you’re going for that is.

1 Like

@Jakerlund home.html#about-john-bloc

I don’t have an activate domain name so I think that’s the reason why it won’t work. I’m previewing everything locally on my computer.

@Moody previewing locally works fine.
We simply link to another page and an anchor on that page.
So from your index.html you link to somepage.html and a bloc id called "about-john-bloc"
And the url then is: somepage.html#about-john-bloc

Just make sure your destination bloc actually has that “about-john-bloc” Id.

1 Like

@Jakerlund LOL no wonder it wasn’t working. It was “index.html” NOT “home.html” Too bad it doesn’t smooth scroll down to the section like the normal scroll to target option, instead it jumps there. Oh well as long as it works.

Thanks for the help! Means a lot!

1 Like

works like a charm! you are the best

1 Like