Topic: Blog Pagination (Next/Previous) for Morfy CMS
Index Page
Item Page
Installation
1. Download and extract this file, put the nextprev folder with its contents in plugins folder.
2. Update you config.php file:
array( 'markdown', 'sitemap', 'nextprev' // <= Activation ), 'nextprev_config' => array( // <= Configuration 'param' => 'page', // <= Page parameter name in URL 'limit' => 5, // <= Number of posts to display per page 'classes' => array( // <= List of item's HTML classes 'page_item' => 'page', 'nav' => 'pager', 'nav_prev' => 'previous', 'nav_next' => 'next', 'nav_disabled' => 'disabled' ), 'labels' => array( // <= List of item's readable text or labels 'nav_prev' => '← Previous', 'nav_next' => 'Next →', 'not_found' => '' ) ) );Not found.
Updating Template File
The plugin includes index_nextprev for posts listing page and item_nextprev for individual page.
1. For blog.html, all posts loop will be replaced by the plugin:
runAction('theme_content_before'); ?> runAction('index_nextprev'); ?> runAction('theme_content_after'); ?>
2. For blog_post.html, the plugin will only return as a next/previous navigation:
runAction('theme_content_before'); ?>Posted on
runAction('item_nextprev'); ?> runAction('theme_content_after'); ?>