Forum
perch_blog_post_comments() won't paginate comments
I'm modifying a Bootstrap template to be managed by the Perch Blog app and I can't get blog post comments to paginate.
I'm displaying them like this:
<?php
perch_blog_post_comments(perch_get('s'), array(
'paginate' => true,
'count' => 4,
));
?>
This will display the comments and limit them to 4 but it won't display the pagination.
I'm also using my own comment.html
template in perch/templates/blog/comment.html. Not sure if that's causing the problem.
Diagnostics:
Perch is up to date
PHP 7.0.10 is up to date
MySQL 5.6.28 is up to date
Image processing available
SUMMARY INFORMATION
Perch: 2.8.33, PHP: 7.0.10, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: 241ae00989d1995ffcbbf63d579943635faf9972 $, with PDO
Server OS: Darwin, apache2handler
Installed apps: content (2.8.33), assets (2.8.33), categories (2.8.33), perch_blog (5.0)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', );
PERCH_LOGINPATH: /perch
PERCH_PATH: /Users/matthewsanchez/Dropbox/blog/perch
PERCH_CORE: /Users/matthewsanchez/Dropbox/blog/perch/core
PERCH_RESFILEPATH: /Users/matthewsanchez/Dropbox/blog/perch/resources
Image manipulation: GD
PHP limits: Max upload 32M, Max POST 32M, Memory: 128M, Total max file upload: 32M
F1: 2edba60ed1f613d6dd804feb202456a2
Resource folder writeable: Yes
HTTP_HOST: blog:8888
DOCUMENT_ROOT: /Users/matthewsanchez/Dropbox/blog
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Can we see your comment.html template?
comment.html
:I don't see any pagination markup in there. You need to add that in the perch:after tags if you want pagination.
Thanks Rachel! The pagination tags weren't in the default comment.html template so I didn't know I had to add them manually.