Skip to content

Instantly share code, notes, and snippets.

@bastianallgeier
Forked from niklausgerber/just-the-thumb.php
Created March 6, 2012 10:25
Show Gist options
  • Save bastianallgeier/1985569 to your computer and use it in GitHub Desktop.
Save bastianallgeier/1985569 to your computer and use it in GitHub Desktop.
Show Images
<?php $articles = $pages->find('blog')->children()->visible()->flip()->limit(3); ?>
<div class="grid">
<div class="row">
<?php $n=0; foreach($articles as $article): ?>
<div class="slot-<?php echo $n . '-' . ($n+1); ?>">
<div class="center">
<a href="<?php echo $article->url() ?>"><?php echo thumb($article->images()->find('thumb.png'), array('width' => 400, 'height' => 300)) ?></a>
</div>
</div>
<?php $n=$n+2; endforeach; ?>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment