I couldn't get pip to work in revolution - here is my replacement code. Be sure turn off caching for any pages where you use it.
/*
* Name: Pip (Pagination Plugin)
* Version: 2.0
* Original Author: Armand "bS" Pondman ([email protected])
* v2.0 Modified by: Valeska "Spellsmith" Scholl ([email protected])
* Updated: January 20, 2009 07:00 CET
* v2.0 Modified by: Steve Davis ([email protected])
* Updated: June 6th 2012
*
* Description:
* will paginate a document when delimiter is found in the content.
*
* Configuration:
* check the OnLoadWebDocument event
*
* optional:
* Edit the values under the CUSTOMIZE Header
*
* Notes: The links for First and Last only appear if you are not on the first, second, (last-1), or last page.
* There's no point in having a "first" link when you're only on page 2, for example.
*
* CSS classes:
* div.pagination controls the styling for the First, Previous, Next, and Last links,
* as well as the "Page X of Y".
*
* div.pagelist_div controls the actual list of individual pages (the entire list - "1 2 3 4 5").
*
* span.pagelist controls the individual page numbers in the pagelist ("1", "2", "3")
*
*
* Change log:
*
* v2.0 - Added "First" and "Last" page jump links.
* Added list of individual pages jump links.
* Added 'pagination', 'pagelist', and 'pagelist_div' classes which can be used for CSS styling.
* Added ModX placeholder "total_pagecount" which can be used in chunks for formatting.
* [Useful for links that need to go to the last page (i.e. linking to comments / comment forms).]
*/
## CUSTOMIZE ##
$delimiter = '{BREAK}';
$tplLinkNext = '<a href="[+link+]">Next »</a>' ;
$tplLinkPrev = '<a href="[+link+]">« Prev</a>';
$tplLinkFirst = '<a href="[+link+]" class="small">< First</a> ';
$tplLinkLast = ' <a href="[+link+]" class="small">Last ></a>';
$tplPageList = '<div class="pagelist_div">[+link+]</div>';
$tplLinkNav = '
<div class="pagination">
[+linkfirst+]
[+linkprev+]
Page [+current+] of [+total+]
[+linknext+]
[+linklast+]
<br />
[+pagelist+]
</div>';
## DO NOT EDIT BELOW THIS LINE ##
$e = &$modx->Event;
switch($e->name) {
case 'OnLoadWebDocument':
$thecontent = $modx->resource->get('content');
if ($_GET["print"]) {
$thecontent = str_replace($delimiter, '', $modx->resource->get('content'));
return;
} // Failsafe to PREVENT pagination for printing.
$pip_content = $thecontent ;
$pip_pagecontent = explode($delimiter, $pip_content);
$pip_pagecount = count($pip_pagecontent);
//echo "name = " . $pip_pagecount . "<br>" . $pip_content; exit;
/* ADDED: LastPageURL */
$modx->setPlaceholder('total_pagecount',$pip_pagecount);
if ($pip_pagecount > 1)
{
$pip_currentpage = isset($_GET["page"]) ? $_GET["page"]: 1;
if ($pip_currentpage > $pip_pagecount || $pip_currentpage < 1) { $pip_currentpage = 1; }
$char = ($modx->config['friendly_urls'] == 0) ? "&" : "?";
$url = $modx->makeurl($modx->resource->get('id'),'',$char.'page=');
$prevpage = $pip_currentpage-1;
$nextpage = $pip_currentpage+1;
/* Generate Page List */
$counter = 1;
while ($counter <= $pip_pagecount) {
$pagelist .= '<span class="pagelist"><a href="' . $url . $counter . '" class="small">' . $counter . '</a></span>';
$counter++;
}
$linkprev = ($prevpage>0) ? str_replace("[+link+]",$url.$prevpage,$tplLinkPrev) : '';
$linknext = ($nextpage>$pip_pagecount) ? '' : str_replace("[+link+]",$url.$nextpage,$tplLinkNext);
$linkfirst = ($prevpage >1) ? str_replace("[+link+]",$url."1",$tplLinkFirst) : '';
$linklast = ($nextpage>($pip_pagecount-1)) ? '' : str_replace("[+link+]",$url.$pip_pagecount,$tplLinkLast);
$linklist = str_replace("[+link+]",$pagelist,$tplPageList);
$pip_template = str_replace("[+linkfirst+]",$linkfirst,$tplLinkNav);
$pip_template = str_replace("[+linkprev+]",$linkprev,$pip_template);
$pip_template = str_replace("[+linknext+]",$linknext,$pip_template);
$pip_template = str_replace("[+linklast+]",$linklast,$pip_template);
$pip_template = str_replace("[+total+]",$pip_pagecount,$pip_template);
$pip_template = str_replace("[+current+]",$pip_currentpage,$pip_template);
$pip_template = str_replace("[+pagelist+]",$linklist,$pip_template);
$pip_content= $pip_pagecontent[$pip_currentpage-1].$pip_template;
}
$modx->resource->set('content',$pip_content);
break;
default:
return;
break;
}