Created
July 8, 2015 19:26
-
-
Save niallthompson/511ad9a22678b395bbb2 to your computer and use it in GitHub Desktop.
Reel Categories
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
<div class="reels"> | |
{% set allCategories = craft.categories.group('videos') %} | |
{% set displayCategories = '' %} | |
{% for video in entry.directorVideos %} | |
{% for cats in video.videoCategory %} | |
{% set displayCategories = displayCategories ~ cats %} | |
{% endfor %} | |
{% endfor %} | |
<p> | |
{% for cat in allCategories %} | |
{% if cat in displayCategories %} | |
{% if cat.slug != categorySelected %} | |
<a href="{{ siteUrl }}directors/{{ entry.slug }}/{{ cat.slug }}" class="is-uppercase">Go to {{ cat }} reel</a><br> | |
{% endif %} | |
{% endif %} | |
{% endfor %} | |
</p> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment