Content last modified Monday 6 March 2017
hop to #bottom
Categories:
Author:
Current version:
3.0
About It:
Get it:
Rate it:
  • Helpful?
  • 1 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

rsx_page_number [original]

Offers the following tags to display page numbers on article list pages: rsx_page_number, rsx_last_page_num, rsx_page_number_nav, rsx_page_number_list

<rsx_page_number_nav />

This tag will print out a simple navigation widget, that will display arrows to the previous and next pages, and will also display the page number you are on, and the total number of pages. It will look something like: << Page 2 of 7 >>. Simple insert the tag <rsx_page_number_nav /> on the page of form you wish the navigation widget to appear.

Optional: You can supply an attribute of newer to change the text used to link to newer pages. Similarly you can supply an attribute of older to change the text used to link to older pages.

The text generated is wraped in spans, that can be styled using css. There are three spans generated, rsx-nav-right, rsx-nav-left, and rsx-nav-middle.

<txp:rsx_page_number_list />

This tag will display a list of page number, that can be used to navigate your site, similar to a listing or search results from google — i.e a list like 1,2,3,4 ... 100, where the numbers are links to the appropriate page.

Optional: You can supply an attribute of delim to change the delimeter of each page number. Currently it is a “,”. You can supply an attribute of windowSize to specify how many pages you would like to have visible in your list at a time.

The tag will generate an unordered list of page numbers. The best way to style such a list is with the following CSS:

ul.rsx-page-num-list{ display:inline; list-style:none; margin:0px; padding:0px; }

ul.rsx-page-num-list li { display: inline; }

<txp:rsx_page_number />

This tag will display the page number associated with the page currently being displayed by textpattern. Simply insert the tag on a page or form where you wish to display the page number.

Optional: You can supply an attribute of offset to add some amount to the current page number. For example, you could use this tag in combination with the <txp:newer> to display the page number you are linking to: <txp:newer> page <txp:rsx_page_number offset="-1" /> </txp:newer> . (I am not so sure if this is a useful feature or not. Nevertheless it is there.)

<txp:rsx_last_page_num />

This tag will display the last page number in an article listing. Simple insert the tag <txp:rsx_last_page_num /> on a page or form template to view the last page number. This tag allows you to display something like “Page 1 of 3” by using the code Page <txp:rsx_page_number /> of <txp:rsx_last_page_num />.

Article Request Count:

Archived [?]: updated version: revised rsx_page_number

Keywords/tags:
Initially released:
2004-05-16
Posted here:
01 Sep 2005
Article modified:
26 Jan 2008

You may want to leave your comments/questions at the Forum thread for quicker feedback. Otherwise, comment away:

Your comment will NOT be submitted until you click the 'Submit' button on the next pageload.

Commented (7)

emmmmm… where’s the link?
Sorry about that. there was a typo in the article that broke the html. fixed now.
How integrate it with searching? I wannt rsx_page_number_list in form search.

Hi, nice one indeed, thanks. However, using txp 4.0.5, there was a bug.

in rsx_page_number_nav you call older() and never() w/ a 1st arg of null. however these functions expect an array and don’t check and array_diff and array_keys smoked. I changed the 1st arg in your calls to array() and viola.

but only in my copy, of course.

Thx
It’s what I looking for

Subscribe to this article's comments RSS feed. [ ? ]   View Recent Comments across the site.

Would you care to write a comment or visit the forum discussion?

You know you want to visit the Archives.

Browse

Categories


Articles

There are also tag clouds, 'cause those are fun.
Published with Textpattern