Recent Comments
public text v1 · immutableIn theme.php:
Controller::get_handler()->handler_vars['recent_comments']= Comments::get( array('limit'=>25, 'status'=>Comment::STATUS_APPROVED, 'orderby'=>'date DESC' ) );
In the theme template itself:
<h3>Recent Comments</h3>
<ul>
<?php foreach($recent_comments as $comment): ?>
<li><a href="<?= $comment->url ?>"><?= $comment->name ?></a> on <a href="<?= $comment->post->permalink; ?>"><?= $comment->post->title; ?></a></li>
<?php endforeach; ?>
</ul>