Skip to content

Instantly share code, notes, and snippets.

@eduardomart
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eduardomart/2da3fbb6e5e0c756d009 to your computer and use it in GitHub Desktop.
Save eduardomart/2da3fbb6e5e0c756d009 to your computer and use it in GitHub Desktop.
Webhook two-level menu
{% set top_menu = cms.navigation %}
<!-- Sidebar -->
<div id="sidebar-wrapper">
<ul class="sidebar-nav">
{#
<li id="menu-close" class="text-right">
<a href="#"><span class="fa fa-close"></span></a>
</li>
#}
{% for item in top_menu.menu_items %}
{% if item.children %}
<li><strong>
<a href="{{ url(item.parent) }}" role="button" aria-expanded="false">{{ item.parent.name }}
<span class="caret"></span></a></strong>
</li>
{% for subitem in item.children %}
<li class="li-indent">
<a href="{{ url(subitem.children) }}">{{ subitem.name }}</a>
</li>
{% endfor %}
{% else %}
<li>
<strong>
<a href="{{ url(item.parent) }}">
{{ item.parent.name }}
</a>
</strong>
</li>
{% endif %}
{% endfor %}
</ul>
</div><!-- /#sidebar-wrapper -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment