Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2009-09-18 06:23:44
- kostas45
- Member
- From: Greece
- Registered: 2007-11-08
- Posts: 61
[request] Admin-side paging in public-side?
Hi,
Just wondering, could the default TXP admin-side paging functionality for articles, images, files (<Prev Page Next>
, View [XX] per page
) be offered as a public-side plugin?
I cannot believe this is not considered before, so I might be missing something essential (link mode maybe?).
Thanks,
Kostas
Offline
Re: [request] Admin-side paging in public-side?
You can use txp:article to display your list in conjunction with txp:newer and txp:older to page long lists of articles. The attribute limit="XX"
allows you to control how many should appear on each page. If you want the user to be able to set the number per page, you could use chs_cookie or perhaps jquery.cookie to handle this via a cookie.
Off the top of my head, you’ll need to make a drop-down select manually that saves the cookie, then at the top of your page, test to see if the cookie exists and if so use that value as a tag-in-tag in your txp:article tag. If I recall correctly chs_cookie has if_cookie and default value tags that you can use for this.
Finally, maybe you can achieve something similar using txp:variable, I’m not sure.
TXP Builders – finely-crafted code, design and txp
Offline
#3 2009-09-21 05:45:33
- kostas45
- Member
- From: Greece
- Registered: 2007-11-08
- Posts: 61
Re: [request] Admin-side paging in public-side?
Jacob, thanks for responding :-)
However, the question remains:
Can the default TXP admin-side paging functionality for articles, images and files be offered as a public-side plugin?
Any thoughts anyone?
Cheers,
Kostas
Offline
#4 2009-09-21 06:06:55
- TheEric
- Plugin Author
- From: Wyoming
- Registered: 2004-09-17
- Posts: 566
Re: [request] Admin-side paging in public-side?
It sure can be. Make it worth a plugin-writers time, and it can be yours quickly.
Offline