Unfolding menus on DjangoCMS?
If I have nested pages, is it possible for, for example, the top level menu items only to show, but when I view a page, for its subpages to appear in the navigation?
So for this structure:
- Page 1
- Page 2
- Page 2a
- Page 2b
- Page 3
When I visit page 1 I see:
- 开发者_StackOverflow社区Page 1
- Page 2
- Page 3
- Page 3a
- Page 3b
When I visit page 2 I see:
- Page 1
- Page 2
- Page 2a
- Page 2b
- Page 3
When I visit page 3 I see:
- Page 1
- Page 2
- Page 3
- Page 3a
- Page 3b
Yes it is possible and easy. Documentation on the show_menu
template-tag explains how to do it.
You need to set extra_active
argument to 1, like this:
{% show_menu 0 100 0 1 %}
Here are the names of each argument:
{% show_menu start_level end_level extra_inactive extra_active %}
精彩评论