Skip to content
This repository has been archived by the owner on Mar 8, 2021. It is now read-only.

Commit

Permalink
show previous, next, pages only if totalpages > 1
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukianenko Dmytro authored and Lukianenko Dmytro committed Nov 2, 2015
1 parent e578b03 commit 7686c43
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions assets/snippets/ditto/classes/ditto.class.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -1123,9 +1123,11 @@ function paginate($start, $stop, $total, $summarize, $tplPaginateNext, $tplPagin
$pages .= $this->template->replace(array('page'=>$display),$tplPaginateCurrentPage);
}
}
if ($totalpages>1){
$modx->setPlaceholder($dittoID."next", $nextplaceholder);
$modx->setPlaceholder($dittoID."previous", $previousplaceholder);
$modx->setPlaceholder($dittoID."pages", $pages);
}
$modx->setPlaceholder($dittoID."splitter", $split);
$modx->setPlaceholder($dittoID."start", $start +1);
$modx->setPlaceholder($dittoID."urlStart", $start);
Expand Down

0 comments on commit 7686c43

Please sign in to comment.