You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/4.0/menu-editor-api.md
+10-1Lines changed: 10 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,9 +98,18 @@ Also accepts the shared [`icon`](#icon), [`color`](#color), [`hotkey`](#hotkey),
98
98
|`true` / `false`| Forces the state. |
99
99
100
100
:::warning `active` is ignored on sub-items
101
-
For links nested inside a `resource` block, Avo computes the active sub-item itself — inclusively, favoring the most specific (longest) matching path — and a per-link `active:` has no effect.
101
+
For links nested inside a `resource`or `link_to`block, Avo computes the active sub-item itself — inclusively, favoring the most specific (longest) matching path — and a per-link `active:` has no effect.
102
102
:::
103
103
104
+
Passing a block nests sub-items under the link — see the [sub-items guide](./menu-editor.html#sub-items). The link itself stays clickable, and Avo forces it active while one of its children is.
Copy file name to clipboardExpand all lines: docs/4.0/menu-editor.md
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,7 +90,7 @@ The `all_resources` helper takes your [authorization](./authorization) rules int
90
90
91
91
## Sub-items
92
92
93
-
You can nest items beneath a `resource` by passing a block. They appear as child items under the resource link in the sidebar. Any item type can be nested; a nested `resource`, `dashboard`, `page`, `board`, or `action` resolves its own URL automatically, so only `link_to` needs an explicit `path:`. A nested `action` also inherits its enclosing resource, so you don't repeat it.
93
+
You can nest items beneath a `resource`or a `link_to`by passing a block. They appear as child items under the parent link in the sidebar, which stays clickable and goes to its own page. Any item type can be nested; a nested `resource`, `dashboard`, `page`, `board`, or `action` resolves its own URL automatically, so only `link_to` needs an explicit `path:`. A nested `action` also inherits its enclosing resource, so you don't repeat it.
# A plain link nests the same way — a custom page and its sub-pages.
109
+
link_to "Design", path:"/admin/design"do
110
+
link_to "Chat", path:"/admin/design/chat"
111
+
link_to "Loader", path:"/admin/design/loader"
112
+
end
107
113
}
108
114
end
109
115
```
@@ -219,7 +225,7 @@ A [collapsable](./menu-editor-api.html#collapsable) section or group already car
219
225
220
226
## Icons
221
227
222
-
The [`icon`](./menu-editor-api.html#icon) option is supported on `section` and on individual menu items (`link_to`, `resource`, `dashboard`, `page`, `form`, `board`, `action`). It is not supported on `group` or on sub-items nested inside a `resource` block.
228
+
The [`icon`](./menu-editor-api.html#icon) option is supported on `section` and on individual menu items (`link_to`, `resource`, `dashboard`, `page`, `form`, `board`, `action`). It is not supported on `group` or on sub-items nested inside a `resource`or `link_to`block.
223
229
224
230
You can use icons from [Tabler Icons](https://tabler.io/icons) (preferred in Avo 4) or from [Heroicons](https://heroicons.com/) (both `outline` and `solid` variants).
0 commit comments