generated from thegrind/laravel-dockerized
35 lines
877 B
Markdown
35 lines
877 B
Markdown
---
|
|
title: Navigation
|
|
description: Building a navigation menu for your site
|
|
extends: _layouts.documentation
|
|
section: content
|
|
---
|
|
|
|
# Navigation {#navigation}
|
|
|
|
The navigation menu in the left-hand sidebar is defined using an array in `navigation.php`. Nested pages can be added by using the `children` associative array.
|
|
|
|
```php
|
|
<?php
|
|
// navigation.php
|
|
|
|
return [
|
|
'Getting Started' => [
|
|
'url' => 'docs/getting-started',
|
|
'children' => [
|
|
'Customizing Your Site' => 'docs/customizing-your-site',
|
|
'Navigation' => 'docs/navigation',
|
|
'Algolia DocSearch' => 'docs/algolia-docsearch',
|
|
'Custom 404 Page' => 'docs/custom-404-page',
|
|
],
|
|
],
|
|
'Jigsaw Docs' => 'https://jigsaw.tighten.co/docs/installation',
|
|
];
|
|
|
|
// config.php
|
|
'navigation' => require_once('navigation.php'),
|
|
|
|
// blade files
|
|
$page->navigation
|
|
```
|