Skip to content

Commit d0bc2d4

Browse files
committed
Create documentation note
1 parent ace3cbe commit d0bc2d4

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

docs/digging-deeper/navigation.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,11 @@ For example: `_docs/getting-started/installation.md` will be placed in a group c
294294

295295
>info Tip: When using subdirectory-based dropdowns, you can set their priority using the directory name as the array key.
296296

297+
#### Dropdown menu notes
298+
299+
Here are some things to keep in mind when using dropdown menus, regardless of the configuration:
300+
- Dropdowns take priority over standard items. So if you have a dropdown with the key `about` and a page with the key `about`, the dropdown will be created, and the page won't be in the menu.
301+
- For example: With this file structure: `_pages/foo.md`, `_pages/foo/bar.md`, `_pages/foo/baz.md`, the link to `foo` will be lost.
297302

298303
## Digging Deeper into the internals
299304

packages/framework/src/Framework/Features/Navigation/NavigationMenuGenerator.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,6 @@ protected function getOrCreateGroupItem(string $groupName): NavigationGroup
158158
// so here we create a new instance to replace the base one, this
159159
// does mean we lose the destination as we can't link to them.
160160

161-
// Todo: Add note in documentation about this behavior
162-
// Example file structure: _pages/foo.md, _pages/foo/bar.md, _pages/foo/baz.md, here the link to foo will be lost.
163-
164161
$item = new NavigationGroup($group->getLabel(), [], $group->getPriority());
165162

166163
$this->items->put($groupKey, $item);

0 commit comments

Comments
 (0)