diff --git a/docs/menugeneration.rst b/docs/menugeneration.rst index 32c8ee9ec49a44f4e57b2090030054b3ae4967a9..69cee42873199a67b8e3c6cf0e1e6d5b3bd93d87 100644 --- a/docs/menugeneration.rst +++ b/docs/menugeneration.rst @@ -11,6 +11,7 @@ Django Menu Generator uses python dictionaries to represent the menu items, usua "url": URL spec, "root": True | False, "related_urls": [ list of related URLs ], + "related_views": [ list of related views ], "validators": [ list of validators ], "submenu": Dictionary like this } @@ -25,6 +26,8 @@ Where each key is as follows: - ``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`) + - ``related_views``: If the currently opened page resolves to one of these views, the menu item will be marked as selected. + - ``root``: A flag to indicate this item is the root of a path, with this you can correctly mark nested menus as selected. - ``validators``: See :doc:`validators` @@ -89,4 +92,4 @@ With this feature you can have a project structure like this:: │ ... -You can have a mix of the two approaches if you wish \ No newline at end of file +You can have a mix of the two approaches if you wish