File tree Expand file tree Collapse file tree 3 files changed +44
-1
lines changed
cms_bootstrap3/templates/bootstrap Expand file tree Collapse file tree 3 files changed +44
-1
lines changed Original file line number Diff line number Diff line change 14
14
< ul class ="nav navbar-nav "> {% main_menu %}</ ul >
15
15
</ div >
16
16
</ div >
17
- </ nav >
17
+ </ nav >
Original file line number Diff line number Diff line change
1
+ {% load bootstrap_tags i18n %}
2
+ < nav class ="navbar {{ navbar_classes }} " role ="navigation ">
3
+ < div class ="container ">
4
+ < div class ="navbar-header ">
5
+ < button type ="button " class ="navbar-toggle " data-toggle ="collapse " data-target =".navbar-collapse ">
6
+ < span class ="sr-only "> {% trans "Toggle navigation" %}</ span >
7
+ < span class ="icon-bar "> </ span >
8
+ < span class ="icon-bar "> </ span >
9
+ < span class ="icon-bar "> </ span >
10
+ </ button >
11
+ < a class ="navbar-brand " href ="/ "> {{ navbar_brand }}</ a >
12
+ </ div >
13
+ < div class ="collapse navbar-collapse ">
14
+ < ul class ="nav navbar-nav "> {% main_menu "bootstrap/menu/ng-navbar.html" %}</ ul >
15
+ </ div >
16
+ </ div >
17
+ </ nav >
Original file line number Diff line number Diff line change
1
+ {% for child in children %}
2
+ < li class ="{% if child.selected or child.ancestor %}active{% endif %}{% if child.children %} dropdown{% endif %} "{% if child.children %} dropdown =""{% endif %} >
3
+ {% if child.children %}
4
+ < a href ="{{ child.get_absolute_url }} " class ="dropdown-toggle " dropdown-toggle =""> {{ child.get_menu_title }} < b class ="caret "> </ b > </ a >
5
+ < ul class ="dropdown-menu ">
6
+ {% if child.visible %}
7
+ < li {% if child.selected %} class ="active "{% endif %} >
8
+ < a href ="{{ child.attr.redirect_url|default:child.get_absolute_url }} "> < strong > {{ child.get_menu_title }}</ strong > </ a >
9
+ </ li >
10
+ < li class ="divider "> </ li >
11
+ {% endif %}
12
+ {% comment %}
13
+ Bootsrap3 does not support submenues, so levels > 1 can't be handled be the main_menu tag and therfore
14
+ recursion has been dropped intentionally. Read https://github.com/twbs/bootstrap/pull/6342 for details.
15
+ {% endcomment %}
16
+ {% for grandchild in child.children %}
17
+ < li {% if grandchild.selected %} class ="active "{% endif %} >
18
+ < a href ="{{ grandchild.attr.redirect_url|default:grandchild.get_absolute_url }} "> {{ grandchild.get_menu_title }}</ a >
19
+ </ li >
20
+ {% endfor %}
21
+ </ ul >
22
+ {% else %}
23
+ < a href ="{{ child.attr.redirect_url|default:child.get_absolute_url }} "> {{ child.get_menu_title }}</ a >
24
+ {% endif %}
25
+ </ li >
26
+ {% endfor %}
You can’t perform that action at this time.
0 commit comments