Abuja Digital Studio · Est. 2018
Start a Project
DocsONavItems, dropdowns, and mega panels
Reference

Items, dropdowns, and mega panels

ONavorravo.com/docs/onav/items-dropdowns

Items, dropdowns, and mega panels

Primary item schema

Every nav item is an associative array stored in onav_config['primary']['items']:

php[
    'label'    => 'Products',
    'url'      => '/products',
    'target'   => '_self',
    'type'     => 'link',   // link | dropdown | mega | button | separator
    'icon'     => '',       // Lucide icon name, e.g. 'package'
    'badge'    => '',       // small text badge
    'children' => [],       // for dropdown or mega type
]

Dropdown

Set type = 'dropdown' and add children. Each child is a simple link with optional description:

php[
    'label'    => 'Features',
    'type'     => 'dropdown',
    'children' => [
        [ 'label' => 'Analytics',  'url' => '/features/analytics',  'description' => 'Real-time data' ],
        [ 'label' => 'Automation', 'url' => '/features/automation', 'description' => 'Set-and-forget' ],
    ],
]

Mega panel

Mega panels are the killer feature. They render as full-width drops with columns, icons, and a featured tile. Two ways to define one:

  1. Inline - set type = 'mega' and fill mega.columns and mega.featured directly in the item.
  2. By reference - create a Mega Panel post under ONav > Mega Panels (CPT orv_mega_panel), then reference it from a nav item by ID. The visual editor handles meta like width, columns, and theme.

Width, column count, and light/dark theme live in panel post meta. Use the Mega Panel route when the same panel needs to appear in more than one place or when an editor (not the dev) should own its content.

Items, dropdowns, and mega panels · ONav Docs | Orravo