Menus

Orchid's built-in menu generation intelligently connects site structure to site menus which adapt themselves to site content.


Menus are typically defined by the Theme and by the Page, and it is common for both kinds of menus to appear on a single output Page's layout. Menus typically pull pages from the Index to dynamically generate the menu items, so all that is required to keep a menu up-to-date is to choose the appropriate menu item types.

It is common for plugins to define their own menu item types, especially ones that correspond directly to the Pages a Generator in the plugin creates. The exact methods of pulling indexed pages into a menu item are left up to the plugin, and may be as opinionated as showing the latest blog posts in a single category, or as generic as simply asking for a URL to link to.

The most common menu items are described below. Individual plugins may contribute additional types.

Add an item to the menu to any single page in your site by its itemId (optionally filtered by collectionType and collectionId). See Internal Links for more about locating to pages with these properties.

This menu item is analogous to the <a href="https://orchid.run/wiki/user-manual/core-concepts/internal-links#find-function">find()</a> or <a href="https://orchid.run/wiki/user-manual/core-concepts/internal-links#anchor-function">anchor()</a> template functions.

menu: 
  - type: `page`
    itemId: 'itemId'
    collectionId: 'collectionId'
    collectionType: 'collectionType'

Collection Pages Menu Item

Add items to the menu to a group of pages located by their collectionType and collectionId. See Internal Links for more about locating to pages with these properties.

This menu item is analogous to the <a href="https://orchid.run/wiki/user-manual/core-concepts/internal-links#find-all-function">findAll()</a> template function.

menu: 
  - type: `collectionPages`
    collectionId: 'collectionId'
    collectionType: 'collectionType'