I have created a metabox that takes a name that the user can give as an additional name of their post. I am wondering how I can automatically create a menu item based on the name the user input into the metabox, and set the url to #PostName?
Even if someone could guide me in the right direction on creating the menu item from a metabox on the post screen I could figure out the rest.
EDIT: I have added some extra info since I understand it seems a little confusing to someone who has know idea of why I want this.
I am creating a custom theme with the html5 boilerplate. It is a one page theme that users add sections to the page by adding posts. The theory is the user adds a custom name to the post into a meta box on the page and it will add the menu item with that name. Since the meta box I created already adds an ID in the html of each post with an additional ID tag the url for the menu will be #PostName. This is so when the user clicks the menu item it will automatically scroll right to the section.
In most themes the Nav menu brings you to a different page. Since my theme is only a one page theme the nav links will bring the user to the section on the page. All I am trying to accomplish is to add some automation in the theme so the users don't need to add the menu items manually.