Commit 07ade4c2 authored by Brian Peterson's avatar Brian Peterson

make nested sub-categories show up in the layout template

parent b84302ef
...@@ -22,23 +22,32 @@ ...@@ -22,23 +22,32 @@
{%- if children %} {%- if children %}
{% set class_name = item.get_class_name() %} {% set class_name = item.get_class_name() %}
{%- if item.is_active(admin_view) %} {%- if item.is_active(admin_view) %}
<li class="active dropdown"> <li class="active dropdown{% if class_name %} {{class_name}}{% endif %}">
{% else -%} {% else -%}
<li class="dropdown"> <li class="dropdown{% if class_name %} {{class_name}}{% endif %}">
{%- endif %} {%- endif %}
<a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)"> <a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">
{% if item.class_name %}<i class="{{ item.class_name }}"></i> {% endif %}{{ item.name }}<b class="caret"></b> {% if item.class_name %}<i class="{{ item.class_name }}"></i> {% endif %}{{ item.name }}<b class="caret"></b>
{{ menu_icon(item) }}{{ item.name }}
{%- if 'dropdown-submenu' not in class_name -%}<b class="caret"></b>{%- endif -%}
</a> </a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
{%- for child in children -%} {%- for child in children -%}
{%- if child.is_category() -%}
{{ menu(menu_root=[child]) }}
{% else %}
{% set class_name = child.get_class_name() %} {% set class_name = child.get_class_name() %}
{%- if child.is_active(admin_view) %} {%- if child.is_active(admin_view) %}
{{ child.is_active(admin_view) }}
<li class="active{% if class_name %} {{class_name}}{% endif %}"> <li class="active{% if class_name %} {{class_name}}{% endif %}">
{% else %} {% else %}
<li{% if class_name %} class="{{class_name}}"{% endif %}> <li{% if class_name %} class="{{class_name}}"{% endif %}>
{%- endif %} {%- endif %}
<a href="{{ child.get_url() }}"{% if child.target %} target="{{ child.target }}"{% endif %}>{{ menu_icon(child) }}{{ child.name }}</a> <a href="{{ child.get_url() }}"{% if child.target %}
target="{{ child.target }}"{% endif %}>
{{ menu_icon(child) }}{{ child.name }}</a>
</li> </li>
{%- endif %}
{%- endfor %} {%- endfor %}
</ul> </ul>
</li> </li>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment