Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Loop (
<?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>
<?php echo kirbytext($article->text()) ?>
<?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