Created
June 27, 2014 05:33
-
-
Save sskylar/7d97b721ba238348d5b2 to your computer and use it in GitHub Desktop.
Group a limited number of featured posts in Siteleaf using Liquid.
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
{% assign featured_ids = '' %} | |
Featured: | |
{% for post in taxonomy['tags']['featured'].posts limit:4 %} | |
{% assign featured_ids = featured_ids | append:',' | append:post.id %} | |
<li>{{post.title}}</li> | |
{% endfor %} | |
Everything else: | |
{% for post in posts %} | |
{% unless featured_ids contains post.id %} | |
<li>{{post.title}}</li> | |
{% endunless %} | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment