<?php

/**
 * Category template
 *
 */
include_once "./blog.inc";
$posts = $pages->find("template=post, categories={$page}, limit=10");
if ($input->urlSegment1) {
    // rss feed
    if ($input->urlSegment1 != 'rss') {
        throw new Wire404Exception();
    }
    renderRSS($posts);
    return;
}
$n = $posts->getTotal();
$headline = $page->title;
$content = $page->body . renderPosts($posts, true);
$subnav = renderNav($page->parent->title, $page->siblings, $page);
include "./main.inc";
Ejemplo n.º 2
0
<?php

/**
 * Blog posts template
 *
 */
include_once "./blog.inc";
if ($input->urlSegment1) {
    // check for rss feed
    if ($input->urlSegment1 != 'rss') {
        throw new Wire404Exception();
    }
    $homepage = $pages->get('/');
    renderRSS($page->children("limit=10"), $homepage->get('headline|title'), $homepage->get('summary|meta_description'));
} else {
    // display paginated blog list
    $headline = $page->get('headline|title');
    $content = renderPosts("limit=10", true);
    include "./main.inc";
}