Created
May 14, 2013 19:51
-
-
Save bobdenotter/5578943 to your computer and use it in GitHub Desktop.
Using a loop, with loop.first to make the first one different..
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
{# get some records.. #} | |
{% setcontent records = "pages/latest/6" %} | |
{# use for to iterate over the records. #} | |
{% for record in records %} | |
{% if loop.first %} | |
{# first record is bigger.. #} | |
<article class="big"> | |
<h1><a href="{{ record.link }}">{{ record.title }}</a></h1> | |
{{ record.introduction }} | |
</article> | |
{% else %} | |
<article class="other"> | |
<h2><a href="{{ record.link }}">{{ record.title }}</a></h2> | |
{{ record.introduction }} | |
</article> | |
{% endif %} | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment