Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2013-05-18 21:02:14

SPKuja
Member
From: England
Registered: 2013-05-18
Posts: 55
Website

Pagination for Catagories

Hi, I am trying to get pagination working for pages showing certain categories, I am using the following:

<txp:article_custom category=“gaming-news” limit=“20” pgonly=“0” section=“articles” sort=“Posted desc” status=“4” />

So basically, when the limit of 20 is reached, how do I make it generate another page with the older ones on it? Here is an example of what I am on about:

http://www.glaciergaming.co.uk/blog/gaming-news

Thanks in advance!

Offline

#2 2013-05-18 22:00:19

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,477

Re: Pagination for Catagories

Tag references:

Newer

Older

Offline

#3 2013-05-18 22:01:36

etc
Developer
Registered: 2010-11-11
Posts: 5,472
Website GitHub

Re: Pagination for Catagories

Hi, welcome to the forum.

<txp:article_custom /> will not paginate at all. If you can not use <txp:article />, here is a plugin solution:

<!-- pagination bar -->
<txp:etc_pagination
	pages='<txp:etc_numpages category="gaming-news" section="articles" pageby="20" />'
	range="0"
	pgcounter="page"
	next="Older" prev="Newer"
/>

<!-- articles display -->
<txp:article_custom category="gaming-news" limit="20" section="articles"
	offset='<txp:etc_offset pgcounter="page" pageby="20" />'
/>

Offline

#4 2013-05-18 22:32:21

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,477

Re: Pagination for Catagories

I’m sorry, I had overlooked the <txp:article_custom />, of course, my answer is only for <txp:article />.

Offline

#5 2013-05-18 22:34:08

SPKuja
Member
From: England
Registered: 2013-05-18
Posts: 55
Website

Re: Pagination for Catagories

Thank you both for replying so quickly and for the help :) It works like a charm now!

Offline

Board footer

Powered by FluxBB