Skip to content

Commit 3427bbe

Browse files
author
Evan Borgstrom
committed
Add info about generate_menu needing to be called inside a block.
Fixes #36 -- thanks @ribozz
1 parent 247f2b8 commit 3427bbe

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

docs/usage.rst

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,18 @@ Example::
8585
Once you have your menus defined you need to incorporate them into your
8686
templates. This is done through the ``generate_menu`` template tag::
8787

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.
8997

9098
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.
92100

93101
#. ``menus`` - This is an object that contains all of the lists of menus as
94102
attribute names::

0 commit comments

Comments
 (0)