Skip to content

Menu Builder

Oleg Ivanchenko edited this page Oct 18, 2026 · 2 revisions

Menu Builder

oCMS includes a visual menu builder for creating navigation menus.

Features

  • Drag-and-Drop Ordering — Reorder menu items with drag-and-drop
  • Hierarchical Menus — Create nested menu structures with parent-child items
  • Two Link Types — Link to pages, or add custom links to internal paths or external URLs
  • Header and Footer Menus — Themes render the menus whose slug is main (header) or footer; these two menus cannot be deleted
  • Per-Language Menus — Create separate menus for each language (see Multi-Language)

Managing Menus

  1. Navigate to Admin > Menus
  2. Click New Menu to create a menu
  3. Set a name, a slug and a language
  4. Add items by selecting pages or entering a custom link
  5. Drag and drop to reorder items within a level; set an item's parent to nest it (the editor shows up to three levels)
  6. Click Save Order

Theme Integration

Theme templates receive the menu with slug main as .Navigation (also .MainMenu) and the menu with slug footer as .FooterNav (also .FooterMenu), for the current language:

{{range .Navigation}}
<a href="{{.URL}}">{{.Title}}</a>
{{end}}

Each item has .Title, .URL, .Target, .IsActive and .Children. See Theme System for details on theme template integration.

Menu Translation

For multi-language sites, create a separate menu for each language:

  1. Create "Main Menu - EN" with slug main and language set to English
  2. Create "Main Menu - RU" with slug main and language set to Russian
  3. Your theme loads the appropriate menu based on the current language, and falls back to the default-language menu when none exists for it

The slug is unique per language, so each translation reuses the same slug.

See Multi-Language for the full multi-language workflow.

Clone this wiki locally