PDA

View Full Version : displaying "page n of x" in paged archive


romamor
06-30-2008, 08:09 PM
Is there a way to show pages in an archive or a browse page as
"n of x", eg. page "5 of 50".

Right now I can get "previous 1 2 3 next", however, having 1000+ images, with 20/page, would give me a series of 1 2...50 page numbers, which is a very long list and breaks my template, besides being not very user friendly.

At the very least, I'd like to display "previous | page 5 of 50 | next",
and no individual page numbers.

I see I have the <ARCHIVE_PAGES_NUM> which gives me the current page number in a paged archive, however, I do not seem to find a tag that gives me the total number of pages in the archive.

romamor
07-01-2008, 12:03 AM
Ok, I figured out the n of x part and it was easy; just add the following new tag in the paged_archive.php file after line 729:

// Create new tag for max number of pages
$tpl = str_replace("<ARCHIVE_NUM_PAGES>",$num_browse_pages,$tpl);// number of pages you are viewing

Now what I need to find out is how to supress the individual page numbers between ``previous`` and ``next``, and perhaps how to replace ``previous and ``next`` with arrows.

(Windows Vista crap - every now and then I can`t type quotes)

romamor
07-01-2008, 12:27 AM
The arrows part was easy again; just edit the language file:

$lang_previous = "&larr;"; // "Previous";
$lang_next = "&rarr;"; // "Next";

The last thing to do is how to remove the individual page numbers.