tooth-paste Posted September 17, 2018 Share Posted September 17, 2018 Hi, How can I combine these two scripts to add pagination and show 10 items max? $items = $page->portal_bestanden; foreach ($items as $item) { $name = str_replace("_", " ", $item->name); echo '<div class="row" style="padding:7px 0 5px 0"> <div class="col-md-6"> <a href="'. $item->url .'">'. $name .'</a><br /> </div> <div class="col-md-2"> '. $item->filesizeStr .'<br /> </div> <div class="col-md-4"> '. $item->description .'<br /> </div> </div> <div class="row"> <div class="col-md-12 lijn"> <div class="lijn"></div> </div> </div>'; } and $pagination = $items->renderPager(array( 'nextItemLabel' => "Volgende", 'previousItemLabel' => "Vorige" )); echo $pagination; Link to comment Share on other sites More sharing options...
arjen Posted September 17, 2018 Share Posted September 17, 2018 Hi tandpasta, The pagination workings of ProcessWire are really well documented. Based on your fieldname (bestanden) you are not using pages but a file field? Not sure if this is possible, it might. Link to comment Share on other sites More sharing options...
elabx Posted September 17, 2018 Share Posted September 17, 2018 Check this post from Ryan: 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