Creating Menu Items on the Fly

The Menus administration form is one place where you can create menu items (see Working with Menus: Administration Page).

There's another way to create a menu item: when you create or edit a node, you can create a menu item for it on the fly.

For example, you create a node with company information, and want a link to that node to appear in a menu called 'site menu'. You could create the node, head to the Menus administration form, and create a new menu item within the menu called 'site menu'.

There's another way to do the same: when you create the new node, you can create a menu item right then and there. On the 'Submit Page' form (or 'Submit Story', etc.), look under 'Menu settings', and set the menu item's title, description, parent item, and weight. When choosing a parent item in the drop-down list, you are of course free to choose a menu itself, or a "parent" menu item (making the link to your new node a "child" menu item of the "parent").

There's one difference from creating the menu item using the Menus administration form. You don't set a path when creating a menu item on the fly. The link's path is automatically set to the node you just created.

See Create a Page Node and Working with Menus: Administration Page.

Restricting on-the-fly menus

When making a menu on the fly, you can place it under any menu or menu item that appears in the "parent item" list (which should be all of the menus and menu items in your site).

But if you have multiple users allowed to create content, you may want to restrict their placement of on-the-fly menu items into just one menu. For example, if you allow users to submit news articles to your site, you might restrict them to creating on-the-fly menu items under a menu called 'news stories', and not under other menus on your site.

To do this:

Navigation » Administer » Site building » Menus

Click the 'Settings' tab. At the bottom of the form, under 'Content authoring form settings', you'll see 'Restrict parent items to:'. Here you can set the single menu to which on-the-fly menu items are restricted. (Keep it at 'Show all menus' for no restrictions.)

Average: 2.6 (9 votes)

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd><br><p>
  • You may quote other posts using [quote] tags.
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
Sorry for the "captcha" spam-detector challenge; the spammers have been out in force. : (
_upermarket: