I am currently developing a one-page based layout with WordPress where the actual content is split up into separate pages in the backend, which are all knit together to a one-page layout in my front-page template file.
The WordPress menus allow for custom URLs which is probably the easiest way to cater a one-pager by referring to #hash-based links which lead to the corresponding divs.
However, I am looking for the probably cleanest solution to organise the menu and its anchors so that the actual editors/admins of a site can simply link to an actual page and have a custom walker translate that into a hash that leads to the right section on the frontend.
So far I would go with the slug of the single pages, let the wp_query pick up the slug and add it as an ID to the wrapping div, e.g.
Page 1 called 'The about page' has a slug 'about-page', so the div then looks like
<div class="section_wrapper" id="about-page"></div>
and type that slug as the hash URL in the menu editor.
Is there a simple walker or another solution that helps out in this case, i.e. turns links to pages into simple hashes? Or an even better practice?