File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -85,10 +85,18 @@ Example::
85
85
Once you have your menus defined you need to incorporate them into your
86
86
templates. This is done through the ``generate_menu `` template tag::
87
87
88
- {% load menu %}{% generate_menu %}
88
+ {% extends "base.html" %}
89
+ {% load menu %}
90
+
91
+ {% block content %}
92
+ {% generate_menu %}
93
+ ...
94
+ {% endblock %}
95
+
96
+ Note that ``generate_menu `` must be called inside of a block.
89
97
90
98
Once you call ``generate_menu `` all of your MenuItems will be evaluated and
91
- the following items will be set in the context for you.
99
+ the following items will be set in the context for you.
92
100
93
101
#. ``menus `` - This is an object that contains all of the lists of menus as
94
102
attribute names::
You can’t perform that action at this time.
0 commit comments