Created
March 20, 2016 07:13
-
-
Save ed-codes/8a1b46b27dc5b9172a22 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="product-description rte" itemprop="description"> | |
{% if product.description contains '<!--split-->' %} | |
{% assign descriptions = product.description | split: '<!--split-->' %} | |
{% for section in descriptions %} | |
{% if section contains '<!--drop-->' %} | |
{% assign heading = section | split: '<!--drop-->' | first %} | |
{% assign body = section | split: '<!--drop-->' | last %} | |
<div class="description-section has-drop collapsed"> | |
<div class="drop-heading"> | |
{{ heading }} | |
</div> | |
<div class="drop-body"> | |
{{ body }} | |
</div> | |
</div> | |
{% else %} | |
<div class="description-section expanded"> | |
{{ section }} | |
</div> | |
{% endif %} | |
{% endfor %} | |
{% else %} | |
<!-- if there is no split --> | |
{{ product.description }} | |
{% endif %} | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment