How do I create previous and next button in Fuelcms blog?
Hi
I am trying to add a previous and next button in Fuelcms blog single post.
I found the $this -> fuel_blog -> get_next_post() which returns the whole next post in the same page.
Is there any way I can do to return an url which refers to the previous and next post?
Thanks you!
Comments
$next = $this -> fuel_blog -> get_next_post(); $url = $next->url;
Is there a way that I can get the archive post in certain category?
For example, I want to have a link to a page which only contains posts in "test" category and in April 2012.
blog/categories/{category}
Or a date:
blog/2012/04/01
blog/2012/04/
blog/2012/
However, it does not out of the box allow you to filter on a date within a particular category. To add that functionality, you would need to modify the fuel/modules/blog/controllers/categories.php controller to have similar functionality as that found in the fuel/modules/blog/controllers/blog.php controller's _remap function.
A PHP Error was encountered Severity: Warning Message: Missing argument 1 for Fuel_blog::get_next_post(), called in /var/www/vhosts/website.com/httpdocs/fuel/modules/blog/views/themes/default/post.php on line 29 and defined Filename: libraries/Fuel_blog.php Line Number: 884
https://github.com/daylightstudio/FUEL-CMS/blob/master/fuel/modules/fuel/libraries/Fuel_posts.php#L684