Created
February 7, 2012 17:37
-
-
Save bastianallgeier/1760935 to your computer and use it in GitHub Desktop.
Loop (getkirby.com)
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 snippet('header') ?> | |
<?php foreach($page->children()->flip() as $article): ?> | |
<?php if($article->template() == 'link'): ?> | |
<!-- link html --> | |
<?php elseif($article->template() == 'article'): ?> | |
<article class="text"> | |
<header><h1><a href="<?php echo $article->url() ?>"><?php echo html($article->title()) ?></a></h1></header> | |
<section> | |
<?php echo kirbytext($article->text()) ?> | |
</section> | |
</article> | |
<?php endif ?> | |
<?php endforeach ?> | |
<?php snippet('footer') ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment