Created
May 3, 2018 03:04
-
-
Save bjornbennett/21a9dc5bae132b1f7341ee9a4da380e3 to your computer and use it in GitHub Desktop.
Shopify Liquid - With this snippet, you will be able to output multiple custom settings via a For Loop. Useful when you want to output multiple sections
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
<!-- LOOPS THROUGH SETTINGS VARIABLES, OUTPUTS VIA A FOR-LOOP --> | |
<div class="container sixteen columns clearfix"> | |
{% for i in (1..7) %} | |
{% capture tbm_title_setting %}identify_title{{i}}{%endcapture%} | |
{% capture tbm_content_setting %}identify_content{{i}}{%endcapture%} | |
{% capture tbm_link_setting %}identify_link{{i}}{%endcapture%} | |
{% assign tbm_title = settings[tbm_title_setting] %} | |
{% assign tbm_content = settings[tbm_content_setting] %} | |
{% assign tbm_link = settings[tbm_link_setting] %} | |
<div class="eight columns clearfix tbm_identify-block"> | |
<div class="four columns alpha"> | |
<a href="/pages/{{tbm_link}}"> | |
{{tbm_title}} | |
<p>Click Here To Learn More</p> | |
</a> | |
</div> | |
<div class="four columns omega"> | |
{{tbm_content}} | |
</div> | |
</div> | |
{% endfor %} | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment