using row anchors in menus

Permalink
Let's say I have a site that is a one-page site, using row anchors rather than page links for navigation. It looks as if the menu doesn't really support this, or am I wrong? I see only linking to pages, files, or external links.

Thanks.

ssailer
 
mnakalay replied on at Permalink Reply
mnakalay
You are correct, the autonav block is built to show the site's pages. Links to parts of the page are based on the page's markup so you would have to make it yourself.

There is a theme in the marketplace called long story short which is designed specifically for single page websites and builds the menu to work that way. You might want to have a look at it.
mnakalay replied on at Permalink Best Answer Reply
mnakalay
Actually, there is a way to do what you want.

In your sitemap, you can add external links. Create one for each anchor you need in your page and for URL give it just the anchor for instance #my-anchor

Then add your menu to the page

When clicking on the link, it will scroll down to the element with ID my-anchor if present on that page.
ssailer replied on at Permalink Reply
ssailer
That's an awesome idea! I will have to try it.

Thanks!
deanhawthornthwaite replied on at Permalink Reply
deanhawthornthwaite
This is just what I've been looking for, thanks so much mnakalay!
So clever!!