Global nav links not navigating to homepage sections/blocs

Hello,

I’m trying to get the menu links in my global nav to scroll / link to sections (blocs) on my homepage.

I’ve tried giving each section an ID, opening the menu manager, choosing type: navigate to URL, and using the section/bloc ID for the URL. I’ve also tried appending the ID to the end of the homepage URL here. Neither result in the proper behavior on my live published site.

I’ve referenced the response found here: https://forum.blocsapp.com/t/menu-links-to-anchors-on-a-page/691

But I wasn’t able to resolve from the response. I’m thinking it may be an issue of the proper punctuation in the ID and/or URLs? I’ve noticed hashtags get changed to “-”, but not sure if I need to add a forward slash to the URL, etc.

Perhaps a before and after example could help clarify the necessary text to make this happen correctly.

Thanks so much in advance!

Your links should look like this:

./index.html#anchor

where anchor is the id of the bloc.

Keep your id’s simple no need to have complicated names for your anchors.

Thank you for your response @pauland

My homepage URL looks like this:
mysite.com/index.html

I gave a bloc on that homepage this ID: About
Then in the menu manager, I chose navigate to URL: #About
I also tried using the full URL in the navigate to URL: http://www.mysite.com/index.html#About

When live, the URL bar changes to the new URL, but the site doesn’t navigate to that bloc, it just stays where it is.

Any ideas?
Thanks!

In your example I would be using ./index.html#About

In these circumstances I would try and create a new project and make a small example. If you still have a problem, we can look at the small example.

See the attached. It works.

Paul

Problem solved, Will?

hey everybody, hi @pauland,

this is exactly what I was seaching for. The problem is, that the anchor of the targets is not on top. It scrolls a little bit below the headline. I attached some screenshots. Any ideas?

Apart from adding extra padding, or using a blank bloc ahead of the actual bloc, then I’m afraid not.

1 Like

:disappointed_relieved: okay thank you