Created
April 27, 2009 18:31
-
-
Save ggoodman/102645 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 | |
$title = "Home"; | |
?> | |
<?php include('fragment.header.php'); ?> | |
<?php $blog->articles | |
->prefetch('user') // Pre-populate the $user member | |
->aggregate('tags') // Call the aggregateTags method of Article on the Query | |
->paginate(20) // Tweak the Query for pagination and add $pager to $blog->articles | |
->orderBy('Article.published DESC'); // Add an order clause | |
?> | |
<?php foreach($blog->articles as $article): ?> | |
<?php render('fragment.article.php', array('article' => $article)); ?> | |
<?php endforeach; ?> | |
<?php include('fragment.footer.php'); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment