Menu Management
TallCMS includes a flexible menu system for managing site navigation. Create menus for different locations (header, footer, sidebar, mobile) with support for...
Features
- Multiple Locations - Header, footer, sidebar, mobile, or custom locations
- Nested Items - Up to 5 levels of hierarchy with drag-and-drop reordering
- Item Types - Page links, external URLs, custom paths, headers, separators
- Active State - Automatic highlighting of current page in navigation
- SPA Mode - Automatic anchor link conversion for single-page sites
- Translations - Multi-language menu labels
Admin Interface
Creating Menus
Navigate to Content > Menus in the admin panel.
- Click New Menu
- Fill in the form:
- Name - Internal identifier (e.g., "Main Navigation")
- Location - Where the menu appears (header, footer, sidebar, mobile)
- Description - Optional notes for administrators
- Active - Enable/disable the menu
- Click Create
Menu Locations
| Location | Purpose | Recommended Style |
|---|---|---|
header | Main site navigation | horizontal |
footer | Footer links | footer or footer-vertical |
sidebar | Sidebar navigation | sidebar |
mobile | Mobile menu (falls back to header) | mobile |
Managing Menu Items
Click Manage Items on any menu to open the item manager.
Adding Items
- Click New Item
- Configure the item:
- Label - Display text (translatable)
- Type - Item type (see below)
- Page - Select a CMS page (for page type)
- URL - Enter URL (for external/custom types)
- Active - Enable/disable item
Item Types
| Type | Description | URL Source |
|---|---|---|
| Page | Link to a CMS page | Auto-generated from page slug |
| External | Link to external website | Full URL (https://...) |
| Custom | Custom URL or path | Relative path (/contact) or anchor (#section) |
| Header | Section heading (no link) | None |
| Separator | Visual divider | None |
Reordering Items
- Drag and drop items to reorder
- Nest items by dragging onto a parent item
- Maximum nesting depth: 5 levels
Preview
Click Preview on a menu to see its structure in a modal, including:
- Menu metadata (name, location, status)
- Visual tree of all items
- Linked page names
- Active/inactive status indicators
Menu Item Properties
Each menu item has these configurable properties:
| Property | Description |
|---|---|
| Label | Display text for the menu item |
| Type | Link type (page, external, custom, header, separator) |
| URL/Page | Target URL or linked page |
| Target | _self (same tab) or _blank (new tab) |
| Icon | Optional Heroicon class |
| CSS Class | Custom CSS classes |
| Active | Enable/disable the item |
Active State
The menu system automatically detects and highlights active items:
- Current page link receives
text-primary-600color - Parent items with active children are also highlighted
- All active links include
aria-current="page"for accessibility
SPA Mode Integration
When Single-Page Mode is enabled in Site Settings, menu links automatically convert to anchor links.
| Regular Mode | SPA Mode |
|---|---|
/about | #about-5 |
/services | #services-12 |
/contact | #contact-8 |
The anchor format is {slug}-{page_id} to avoid collisions.
Custom Anchors
For custom menu items, you can manually set anchors:
- Type: Custom
- URL:
#my-section
These are preserved as-is in both modes.
Multi-Language Support
Menu labels support translations when internationalization is enabled.
Editing Translations
- Open Manage Items for a menu
- Use the locale switcher in the header
- Edit labels in each language
- Labels fall back to default language if not translated
Best Practices
Menu Organization
- One menu per location - Avoid multiple menus for the same location
- Limit nesting - Keep hierarchy to 2-3 levels for usability
- Use headers - Group related items with header type
- Mobile consideration - Test nested menus on mobile devices
Performance
- Limit items - Large menus impact page load
- Cache menus in production (automatic via Laravel's query cache)
Accessibility
- Descriptive labels - Use clear, concise text
- Keyboard navigation - Built-in styles support keyboard nav
- ARIA attributes -
aria-current="page"added automatically
Troubleshooting
Menu Not Appearing
- Verify menu is set to Active
- Check location matches your theme's expected location
- Ensure menu has active items
- Clear view cache:
php artisan view:clear
Items Not Showing
- Check items are set to Active
- For page links, verify the page is Published
- Check parent items are active (inactive parents hide children)
Wrong URL Generated
- For page links, check page slug in admin
- For custom links, ensure URL starts with
/orhttp - In SPA mode, verify page has correct ID
Active State Not Working
- Ensure URLs match exactly (trailing slashes matter)
- Check for query string differences
- For SPA mode, verify anchor format
Next Steps
- Site settings - SPA mode configuration
- Theme development - Custom menu styles
- Internationalization - Multi-language setup