Skip to content

Instantly share code, notes, and snippets.

@schaeken
schaeken / collection-sidebar.liquid
Last active November 18, 2021 13:40
Control the display order of tag groups lists in the collection sidebar using Supply's 'advanced tag filtering' - and control the sort order of the list items within that group using a link list.
<div class="grid-uniform">
{% assign group_array = settings.group_array | split: ',' %}
{% for group in group_array %}
{% if cat_array contains group %}
{% capture array %}{% unless array == blank or array == "" %}{{ array }},{% endunless %}{{group | strip}}{% endcapture%}
{% endif %}
{% endfor%}
{% assign cat_array = array | split:',' %}
{% comment %}
@schaeken
schaeken / mobile-menu.liquid
Last active August 29, 2015 14:12
A basic mobile dropdown menu for shopify stores
{% assign found_active_link = false %}
<select name="main_navigation" id="main_navigation" class="fl">
{% for link in linklists.main-menu.links %}
{% if link.active %}
<option value="{{ link.url }}" selected="selected">{{ link.title }}</option>
{% assign found_active_link = true %}
{% else %}
<option value="{{ link.url }}">{{ link.title }}</option>
{% endif %}
{% for childlink in linklists[link.handle].links %}