Created
June 12, 2013 16:00
-
-
Save andershaig/5766681 to your computer and use it in GitHub Desktop.
Single category at a time
This file contains hidden or 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
| <!-- Current Code on lines 30-32 --> | |
| {% for category in gallery_settings.categories %} | |
| <a href="#" data-cat="{{ category.title | handelize }}"><li>{{ category.title }}</li></a> | |
| {% endfor %} | |
| <!-- First category only --> | |
| {% for category in gallery_settings.categories limit:1 %} | |
| <a href="#" data-cat="{{ category.title | handelize }}"><li>{{ category.title }}</li></a> | |
| {% endfor %} | |
| <!-- Second category only --> | |
| {% for category in gallery_settings.categories limit:1 offset:1 %} | |
| <a href="#" data-cat="{{ category.title | handelize }}"><li>{{ category.title }}</li></a> | |
| {% endfor %} | |
| <!-- So if you have categories called '1' and '2', this code would output '2' then '1' instead --> | |
| {% for category in gallery_settings.categories limit:1 offset:1 %} | |
| <a href="#" data-cat="{{ category.title | handelize }}"><li>{{ category.title }}</li></a> | |
| {% endfor %} | |
| {% for category in gallery_settings.categories limit:1 %} | |
| <a href="#" data-cat="{{ category.title | handelize }}"><li>{{ category.title }}</li></a> | |
| {% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment