|
<!-- |
|
use this snippet for template with split navigation, one on the left and one on the right. |
|
this snippet expects that you have two link list / menus created 1 (main-left and main-right) |
|
HOPE THIS HELPS SOMEBODY =) |
|
--> |
|
|
|
<div class="col-md-4 text-right hidden-xs hidden-sm"> |
|
<div class="site-header-nav hidden-xs hidden-sm"> |
|
|
|
{% if linklists.main-right.links.size > 0 %} |
|
<ul class="nav-left" role="navigation"> |
|
{% for link in linklists.main-left.links %} |
|
{% assign child_list_handle = link.title | handle %} |
|
{% if linklists[child_list_handle] and linklists[child_list_handle].links.size > 0 %} |
|
|
|
<li class="has-dropdown"> |
|
{{ link.title | link_to: link.url }} |
|
<ul class="dropdown-menu"> |
|
{% for child_link in linklists[child_list_handle].links %} |
|
<li> |
|
{{ child_link.title | link_to: child_link.url }} |
|
</li> |
|
{% endfor %} |
|
</ul> |
|
</li> |
|
|
|
{% else %} |
|
<li> |
|
<a href="{{ link.url }}" title="{{ link.title }}"{% if link.active %} class="active"{% endif %}>{{ link.title }}</a> |
|
</li> |
|
{% endif %} |
|
{% endfor %} |
|
</ul> |
|
{% endif %} |
|
|
|
</div><!--/.site-header-nav left--> |
|
</div> |
|
|
|
<div class="col-md-4 text-center"> |
|
|
|
{% if settings.use_logo %} |
|
|
|
<a id="logo" href="/"> |
|
{{ 'logo.png' | asset_url | img_tag: shop.name }} |
|
</a> |
|
|
|
{% else %} |
|
|
|
<h1 class="site-title"><a href="/">{{ shop.name }}</a></h1> |
|
|
|
{% endif %} |
|
|
|
</div> |
|
|
|
<div class="col-md-4 text-left hidden-xs hidden-sm"> |
|
<div class="site-header-nav hidden-xs hidden-sm"> |
|
|
|
{% if linklists.main-right.links.size > 0 %} |
|
|
|
<ul class="nav-right" role="navigation"> |
|
|
|
{% for link in linklists.main-right.links %} |
|
{% assign child_list_handle = link.title | handle %} |
|
{% if linklists[child_list_handle] and linklists[child_list_handle].links.size > 0 %} |
|
|
|
<li class="has-dropdown"> |
|
{{ link.title | link_to: link.url }} |
|
<ul class="dropdown-menu"> |
|
{% for child_link in linklists[child_list_handle].links %} |
|
<li> |
|
{{ child_link.title | link_to: child_link.url }} |
|
</li> |
|
{% endfor %} |
|
</ul> |
|
</li> |
|
|
|
{% else %} |
|
|
|
<li> |
|
<a href="{{ link.url }}" title="{{ link.title }}"{% if link.active %} class="active"{% endif %}>{{ link.title }}</a> |
|
</li> |
|
|
|
{% endif %} |
|
{% endfor %} |
|
|
|
</ul> |
|
|
|
{% endif %} |
|
|
|
</div><!--/.site-header-nav right--> |
|
</div> |
|
|
Hey Jeremy, thanks I've been looking for this!
After creating shopify-split-navigation.liquid and also the main-left & main-right menus, how do I then get them to replace the existing menu, and how do I change my Logo to be in-between the left and right menus?