-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes 77 menu items have a new attribute: menu_level
- Loading branch information
Patrick Lauber
committed
Jun 18, 2009
1 parent
d7f6486
commit cb4604a
Showing
7 changed files
with
73 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,2 @@ | ||
{% load cms_tags cache %} | ||
{#% cache CMS_CONTENT_CACHE_DURATION menu page.id lang current_page.id %#} | ||
{% for child in children %} | ||
<li> | ||
{% if not child.is_leaf_node %}+{% endif %}{{ child.level }} | ||
<a href="{{ child.get_absolute_url }}">{{ child.get_title }}</a><span style="color:#999"> | ||
{% if child.selected %}selected{% endif %} | ||
{% if child.ancestor %}ancestor{% endif %} | ||
{% if child.sibling %}sibling{% endif %} | ||
{% if child.descendant %}descendant{% endif %} | ||
{% if child.soft_root %}(softroot}{% endif %}</span> | ||
{% if child.childrens %} | ||
<ul> | ||
{% show_menu from_level to_level extra_inactive extra_active template child %} | ||
</ul> | ||
{% endif %} | ||
</li> | ||
{% endfor %} | ||
{#% endcache %#} | ||
{% for child in children %} | ||
|
||
{% endfor %} | ||
{% include "cms/menu.html" %} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{% load cms_tags cache %} | ||
{% for child in children %} | ||
<li> | ||
{% if not child.is_leaf_node %}+{% endif %}{{ child.menu_level }} | ||
<a href="{{ child.get_absolute_url }}">{{ child.get_menu_title }}</a> <span style="color:#999"> | ||
{% if child.selected %}selected{% endif %} | ||
{% if child.ancestor %}ancestor{% endif %} | ||
{% if child.sibling %}sibling{% endif %} | ||
{% if child.descendant %}descendant{% endif %} | ||
{% if child.soft_root %}(softroot){% endif %} | ||
(Level: {{ child.level }})</span> | ||
{% if child.childrens %} | ||
<ul> | ||
{% show_menu from_level to_level extra_inactive extra_active template child %} | ||
</ul> | ||
{% endif %} | ||
</li> | ||
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{% include "cms/menu.html" %} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cb4604a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
templatetags/cms_tags.py:58 should be changed to
root_page = Page.objects.get(reverse_id=root_id)
was:
root_page = Page.objects.get(reverse_id=root_page)