I want to use pagination on the homepage/ root page. I created a homepage template that displays articles from this structure:
/homepage/articles/article.
So I try to paginate all the single articles lying beneath "/homepage/articles/" (hope this is not confusing). It's
HOME
ARTICLES
Article 1
Article 2
Article 3
...
I was trying this code:
$results = $pages->find("template=article, limit=15, sort=title");
if(count($results)) {
$pagination = $results->renderPager(array(
'nextItemLabel' => "next",
'previousItemLabel' => "prev",
'listMarkup' => "<ul class='MarkupPagerNav'>{out}</ul>",
'itemMarkup' => "<li class='{class}'>{out}</li>",
'linkMarkup' => "<a href='{url}'><span>{out}</span></a>"
));
echo $pagination;
echo "<ul>";
foreach($results as $result) {
echo "<li><p><a href='{$result->url}'>{$result->title}</a><br /><span class='summary'>{$result->articleDescription}</span></p></li>";
}
echo "</ul>";
echo $pagination;
}
As result, I get the pagination navigation, but it's not working correctly. Clicking through the pages shows always the same results.
This query didn't work eather:
$results = $page->child("title=articles")->children("limit=5");
Any ideas? I was now trying for hours...





Find content
Not Telling
