Skip to content

Instantly share code, notes, and snippets.

@fredryk
Last active December 10, 2015 00:09
Show Gist options
  • Save fredryk/4349218 to your computer and use it in GitHub Desktop.
Save fredryk/4349218 to your computer and use it in GitHub Desktop.
A little snippet in case you come across a theme where sub-navigation isn't showing in the mobile nav select.
{% for link in linklists.main-menu.links %}
{% assign child_list_handle = link.title | handleize %}
{% if linklists[child_list_handle].links != blank %}
<option value="{{ link.url }}">{{ link.title | escape }}</option>
{% for childlink in linklists[child_list_handle].links %}
<option value="{{ childlink.url }}">&nbsp; - {{ childlink.title | escape }}</option>
{% endfor %}
{% else %}
<option value="{{ link.url }}">{{ link.title | escape }}</option>
{% endif %}
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment