can be pagination for each template separately as exemplified below;
blog template
runAction('theme_content_before'); ?>
getPages($url,$order_by,$order_type,$ignore,$limit);
// $url is a folder of posts
$url = CONTENT_PATH . '/blog/';
// $order_by is a order like date or title
$order_by = 'date';
// $order_type is a order type like ASC or DESC
$order_type = 'DESC';
// $ignore = array of files to ignore
$ignore = array('404','index');
// $limit is a number of posts
$limit = 2;
$posts = Morfy::factory()->getPages($url,$order_by, $order_type,$ignore,$limit);
foreach($posts as $post) {
// use default image if not write Thumbnail
$thumbnail = ($post['thumbnail']) ? $post['thumbnail'] : $config['Site_url'].'public/images/default.jpg';
echo '
Posted on '.$post['date'].'
'.$post['content_short'].'
';
}
?>
runAction('pagination'); ?>
runAction('theme_content_after'); ?>
news template
runAction('theme_content_before'); ?>
getPages($url,$order_by,$order_type,$ignore,$limit);
// $url is a folder of posts
$url = CONTENT_PATH . '/news/';
// $order_by is a order like date or title
$order_by = 'date';
// $order_type is a order type like ASC or DESC
$order_type = 'DESC';
// $ignore = array of files to ignore
$ignore = array('404','index');
// $limit is a number of posts
$limit = 2;
$posts = Morfy::factory()->getPages($url,$order_by, $order_type,$ignore,$limit);
foreach($posts as $post) {
// use default image if not write Thumbnail
$thumbnail = ($post['thumbnail']) ? $post['thumbnail'] : $config['Site_url'].'public/images/default.jpg';
echo '
Posted on '.$post['date'].'
'.$post['content_short'].'
';
}
?>
runAction('pagination'); ?>
runAction('theme_content_after'); ?>
http://postimg.org/image/yhzr1img1/