Forum

Thread tagged as: Question, Problem, Blog

Custom pagination issue

Hi

I'm trying to create my own custom pagination and having issues with it not showing. If I use the code gist posted up at it is detecting pagination but is not returning any response.

Any thoughts?

Cheers

Cole

Cole Henley

Cole Henley 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Does turning debug on for the page reveal anything? It should flag up if any templates aren't being found, for example.

Hey Drew

Debug suggests that the template is not being requested:

Any thoughts why the page-links.html template is not being requested? I'm assuming these should be saved in the '/perch/templates/pagination' folder or is that solely for content (rather than blog) pagination?

Cheers

Cole

Drew McLellan

Drew McLellan 2638 points
Perch Support

That's right - and if the path was wrong, you'd get an error.

I'll run up an example and make sure it's working here too.

Hi Drew

Did you get a chance to look at this at all?

Cheers

Cole

Drew McLellan

Drew McLellan 2638 points
Perch Support

Not over the weekend, no. It's on my list for today.

Bah - weekends schmeekends! Thanks Drew :D

Drew McLellan

Drew McLellan 2638 points
Perch Support

That's working here for me. Which version of Perch and Blog are you on?

Perch: 2.6.5, PHP: 5.5.10, MySQL: 5.5.34, with PDO Installed apps: content (2.6.5), assets (2.6.5), categories (2.6.5), perch_blog (4.5.2), perch_forms (1.7)

Ta

Drew McLellan

Drew McLellan 2638 points
Perch Support

Puzzling. Can you try Perch 2.6.6 to be sure (to be sure)?

Tried upgrading but still not working.

If I set count to 10 then all available entries show but restricting to 1 only shows the first item with no pagination.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Do the page links appear?

No - even if resort to default page links template. Looks like this is not being called at all - if I place some text in the '<perch:if exists="paging">' tag for the 'blog/post_in_list.html' template then this is shown but if I place text in the 'pagination/page-links.html' (or 'pagination/default.html') then nothing is shown.

Any further info I can provide to help debug?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Could you show me your diagnostics report?

It's all on localhost so pretty sure there is nothing sensitive in here :D

Drew McLellan

Drew McLellan 2638 points
Perch Support

Thanks... I'll see what I can dig up.

Hey Drew

Appreciate you are a very busy fella - were you able to look at this at all?

Cheers

Cole

Drew McLellan

Drew McLellan 2638 points
Perch Support

I've not been able to get it to fail.