cb2004 Posted July 7, 2015 Share Posted July 7, 2015 Pagination in Processwire is so simple, however it would be so much better if you could set numPageLinks to 0 and this would just leave previous and next links. At the moment I have to code this myself. Link to comment Share on other sites More sharing options...
diogo Posted July 7, 2015 Share Posted July 7, 2015 The simple solution is: .MarkupPagerNav li { display: none; } .MarkupPagerNavPrevious, .MarkupPagerNavNext { display: inline; } --- EDIT: actually, did you try to set the "numPageLinks" options to 0? $results->renderPager(array( 'numPageLinks' => 0 )); I don't know if it works, but it's worth trying 1 Link to comment Share on other sites More sharing options...
cb2004 Posted July 14, 2015 Author Share Posted July 14, 2015 Hi Diogo. Yes I did try that. No joy, seemed to set the default. The CSS solution is good enough for now. Thanks. 1 Link to comment Share on other sites More sharing options...
isellsoap Posted June 19, 2020 Share Posted June 19, 2020 Hi @cb2004, I solved this with this code: $news = $page->children("limit=5"); $pager = $modules->get('MarkupPagerNav'); // this is required in order for getUrl to work // see https://processwire.com/api/ref/markup-pager-nav/get-u-r-l/ $pager->render($news); $paginationMarkup = ''; if ($news->hasPrevPagination() || $news->hasNextPagination()) { $paginationMarkup .= '<ul>'; if ($news->hasPrevPagination()) { $paginationMarkup .= "<li><a href='{$pager->getUrl($pager->pageNum - 1)}'>prev</a></li>"; } if ($news->hasNextPagination()) { $paginationMarkup .= "<li><a href='{$pager->getUrl($pager->pageNum + 1)}'>next</a></li>"; } $paginationMarkup .= '</ul>'; } echo $paginationMarkup; 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now