Skip to content

Commit ace3cbe

Browse files
committed
Update navigation documentation for v2 rewrite
1 parent 4e15aea commit ace3cbe

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

docs/digging-deeper/navigation.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -297,36 +297,33 @@ For example: `_docs/getting-started/installation.md` will be placed in a group c
297297

298298
## Digging Deeper into the internals
299299

300-
While not required to know, you may find it interesting to learn more about how the navigation is handled internally.
301-
The best way to learn about this is to look at the source code, so here is a high-level overview with details on where to look in the source code.
300+
While not required to know, you may find it interesting to learn more about how the navigation is handled internally. Here is a high level overview,
301+
but you can find more detailed information in the [Navigation API](navigation-api) documentation.
302302

303-
The main navigation menu is the `MainNavigationMenu` class, and the documentation sidebar is the `DocumentationSidebar` class.
304-
Both extend the same `BaseNavigationMenu` class:
303+
The main navigation menu is the `MainNavigationMenu` class, and the documentation sidebar is the `DocumentationSidebar` class. Both extend the same base `NavigationMenu` class.
305304

306305
```php
307-
// TODO: Update these examples
308-
309306
use Hyde\Framework\Features\Navigation\MainNavigationMenu;
310307
use Hyde\Framework\Features\Navigation\DocumentationSidebar;
311-
use Hyde\Framework\Features\Navigation\BaseNavigationMenu;
308+
use Hyde\Framework\Features\Navigation\NavigationMenu;
312309
```
313310

314-
Within the `BaseNavigationMenu` class, you will find the main logic for how the menus are generated,
311+
Within the base `NavigationMenu` class, you will find the main logic for how the menus are generated,
315312
while the child implementations contain the extra logic tailored for their specific use cases.
316313

317-
All the navigation menus store the menu items in their `$items` array containing instances of the `NavigationItem` class.
314+
All the navigation menus store the menu items in their `$items` collection containing instances of the `NavigationItem` class.
318315

319316
The `NavigationItem` class is a simple class that contains the label and URL of the menu item and is used to represent each item in the menu.
320-
Dropdowns are represented by `DropdownNavigationItem` instances, which extend the `NavigationItem` class and contain an array of additional `NavigationItem` instances.
317+
Dropdowns are represented by `NavigationGroup` instances, which extend the `NavigationMenu` class and contain a collection of additional `NavigationItem` instances.
321318

322319
```php
323320
use Hyde\Framework\Features\Navigation\NavigationItem;
324-
use Hyde\Framework\Features\Navigation\DropdownNavigationItem;
321+
use Hyde\Framework\Features\Navigation\NavigationGroup;
325322
```
326323

327324
## The Navigation API
328325

329-
If you want to interact with the site navigation programmatically, or if you want to create complex custom, you can do so through the new Navigation API.
326+
If you want to interact with the site navigation programmatically, or if you want to create complex custom menus, you can do so through the new Navigation API.
330327
For most cases you don't need this, as Hyde creates the navigation for you. But it can be useful for advanced users and package developers.
331328

332329
The Navigation API consists of a set of PHP classes, allowing you to fluently interact with the navigation menus. You can learn more about the API in the [Navigation API](navigation-api) documentation.

0 commit comments

Comments
 (0)