There is a little update. Please re-download the plugin. Still trying to deal with pages that have more than one subpage. No error displayed, but all of the items, however depth the folders, are displayed within a single array if called with Morfy::factory()->getPages()
There’s no API method that can be used to retreive pages (file only) that’s only in the current folder, exluding the subfolder.
In CSS, you may know this kind of selector:
#root > folder > .file
#root
- folder
- - i'll be selected
- - folder
- - - but i'll not
- - i'll be selected
- - i'll be selected
Hi thanks! I also already update the plugin to follow Bootstrap’s pagination markup and commented out the stylesheet hooks by default as you suggest. So users no longer need to append the extra stylesheet for this.
ok. I've was tried it. but, there is something wrong in index_nextprev on my themes. This:
echo $post['description'] ? '
' . $post['description'] . '
' : "";
Short content not show up. but when I replace it with this (content_short):
echo $post['content_short'] ? '
' . $post['content_short'] . '
' : "";
successfully. How could that be?
That’s come from different field. $post['description'] come from here:
Title: Welcome
Description: Some description here. // <= this
Keywords: key, words
Author: Awilum
Date: 2013-12-31 00:00:00
Tags: tag1, tag2
Robots: noindex, nofollow
Template: index
Usually used to fill the content for SEO purpose. While the $post['content_short'] come from $post['content'] before {cut}
I will be your post description. // <= this
{cut}
Vitae, velit, temporibus sequi mollitia dolorem voluptatibus assumenda et cumque soluta laudantium commodi odit cupiditate eos nobis quisquam obcaecati vero rerum ut.
You can create a simple conditional function to make sure the post description become visible if available, if not, show the content short:
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 '
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 '
hxxp://latitudu.com/notes/nursing (another blog page)
Note: Here I put the blog pagination in blog.html, so all of the page above only use blog.html template. But again, It works only by detecting folder names from URL, so it will work if you put them in news.html template for example as an alternative for blog.html or has the same behavior with the blog.html template.
// Configuration data
$config = Morfy::$config['nextprev_config'];
with the configuration data:
// Configuration data
$config = array( // <= Configuration
'param' => 'page', // <= Page parameter name in URL
'limit' => 5, // <= Number of posts to display per page
...
);
I think it is better to stop touching the config.php file. Switch back to the previous state. Just focus on your template content.
runAction('theme_content_before'); ?>
'page', // <= Page parameter name in URL
'limit' => 5, // <= Number of posts to display per page
...
);
...
...
?>
runAction('theme_content_after'); ?>