Skip to content

Commit 5e08ab8

Browse files
committed
Add documentation for related_views
1 parent 5d9de29 commit 5e08ab8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/menugeneration.rst

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Django Menu Generator uses python dictionaries to represent the menu items, usua
1111
"url": URL spec,
1212
"root": True | False,
1313
"related_urls": [ list of related URLs ],
14+
"related_views": [ list of related views ],
1415
"validators": [ list of validators ],
1516
"submenu": Dictionary like this
1617
}
@@ -25,6 +26,8 @@ Where each key is as follows:
2526

2627
- ``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`)
2728

29+
- ``related_views``: If the currently opened page resolves to one of these views, the menu item will be marked as selected.
30+
2831
- ``root``: A flag to indicate this item is the root of a path, with this you can correctly mark nested menus as selected.
2932

3033
- ``validators``: See :doc:`validators`
@@ -89,4 +92,4 @@ With this feature you can have a project structure like this::
8992
9093
...
9194

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

Comments
 (0)