Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-05-07 17:48:18

WhiteDog
Member
From: Maine
Registered: 2005-09-07
Posts: 174

Show X results per page

I have no doubt this has been covered before but I cannot seem to put my finger on it. I am trying to figure out how to set up pages /articles to display X number per page.

Example the site’s default article limit is 10 per page. I am looking to create a button to set 25 per page to display or 50 per page to display.

This would lend itself to more gallery like precision. Thanks in advance.


Grrr RRR nnndth grrr Skeek!

Offline

#2 2007-05-07 18:37:02

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,090
Website GitHub Mastodon Twitter

Re: Show X results per page

Hi Whitedog

@<txp:article limit=“50” />@
You might need to change your default form if you wish to just have images.
Alternatively

@<txp:if_category name=“gallery”>@
@<txp:article_custom form=“galleryform” />@
@<txp:else />@
@<txp:article />@
@<txp:if_category>@
Just read the bit re the button… Hmmm… Not sure if it is possible off the box OR even with one of the existing plugins. Having said that i seem to remember somebody asking for a similar thing some time ago

Last edited by colak (2007-05-08 05:06:22)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2007-05-07 19:42:43

WhiteDog
Member
From: Maine
Registered: 2005-09-07
Posts: 174

Re: Show X results per page

Hmm I am not sure that does what i am looking for…

I have set up galleries before in TXP no problem but this is just a little added snip it i’d like.

Veer

does what I want they have a drop down saying how many images to display. I’d imagine it works by writing to a cookie so it remembers the preference. Veer says how many pages there are then gives you the option to change number of images viewed.


Grrr RRR nnndth grrr Skeek!

Offline

#4 2007-05-07 22:23:00

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,726
Website

Re: Show X results per page

You can use either chs_if_urlvar or chs_cookie to do that. See this thread for the basic approach.


TXP Builders – finely-crafted code, design and txp

Offline

#5 2007-05-08 15:12:15

WhiteDog
Member
From: Maine
Registered: 2005-09-07
Posts: 174

Re: Show X results per page

great that will do the trick!


Grrr RRR nnndth grrr Skeek!

Offline

Board footer

Powered by FluxBB