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/menugeneration.rst
+4-1
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ Django Menu Generator uses python dictionaries to represent the menu items, usua
11
11
"url": URL spec,
12
12
"root": True|False,
13
13
"related_urls": [ list of related URLs ],
14
+
"related_views": [ list of related views ],
14
15
"validators": [ list of validators ],
15
16
"submenu": Dictionary like this
16
17
}
@@ -25,6 +26,8 @@ Where each key is as follows:
25
26
26
27
- ``related_urls``: If one of this URLs is part of the path on the currently opened page, the menu item will be marked as selected (format of URLs like described at :doc:`urls`)
27
28
29
+
- ``related_views``: If the currently opened page resolves to one of these views, the menu item will be marked as selected.
30
+
28
31
- ``root``: A flag to indicate this item is the root of a path, with this you can correctly mark nested menus as selected.
29
32
30
33
- ``validators``: See :doc:`validators`
@@ -89,4 +92,4 @@ With this feature you can have a project structure like this::
89
92
│
90
93
...
91
94
92
-
You can have a mix of the two approaches if you wish
95
+
You can have a mix of the two approaches if you wish
0 commit comments