Last active
December 27, 2015 12:29
-
-
Save jarednova/7326247 to your computer and use it in GitHub Desktop.
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
<?php | |
$context = Timber::get_context(); | |
$context['galleries'] = Timber::get_posts(); | |
Timber::render('archive-gallery.twig', $context); |
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
{% extends "base.twig" %} | |
{% block content %} | |
{% if title %}<h1 class="page-title">{{title}}</h1>{% endif %} | |
{% for post in pc.posts %} | |
<article class="teaser{% if loop.index is odd %} alt{% endif %}" id="teaser-{{post.ID}}"> | |
<h1 class="teaser-title"><a href="{{post.permalink}}">{{post.title}}</a></h1> | |
<div class="teaser-content"> | |
<p>{{post.get_preview}}</p> | |
<ul class="pagecraft-photos"> | |
{% for photo in galleries.photos|slice(0,3) %} | |
<li class="pagecraft-photos-photo"> | |
<a href="{{ post.permalink }}"> | |
<img src="{{ photo.src.thumbnail }}" alt="{{ photo.caption }}"> | |
</a> | |
</li> | |
{% endfor %} | |
</ul> | |
</div> | |
</article> | |
{% endfor %} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment