Skip to content

Commit a28ce86

Browse files
author
Ben Cole
committed
Added - Some documentation to clarify that kwargs can be passed to the instantiation of MenuItem that will become available in templates
1 parent 6862c39 commit a28ce86

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docs/usage.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ the menu and the URL, and the keywords that affect menu generation are:
3333
and returns ``True`` or ``False`` if the ``MenuItem`` should be visible for
3434
this request
3535

36+
Additional kwargs can be passed to ``MenuItem`` and these will become
37+
available in your templates. For example adding ``separator=True`` could be
38+
used to add separators to menus ``{% if item.separator %}<li
39+
class="divider"></li>{% endif %}``
40+
3641
For the full list of ``MenuItem`` options see the `menu __init__.py source file`_.
3742

3843
Usage Example

0 commit comments

Comments
 (0)