melissa_boyle Posted April 22, 2015 Share Posted April 22, 2015 Hi Guys, Is there any solution to paginating repeater fields as of yet? Thanks, Mel Link to comment Share on other sites More sharing options...
blad Posted April 22, 2015 Share Posted April 22, 2015 I have no idea. Sorry I can´t help you, Here the same topic two years ago. 1 Link to comment Share on other sites More sharing options...
deadbeat Posted August 9, 2015 Share Posted August 9, 2015 HI, I have the code below in a page and the repeater works fine. Is it possible to paginate after a set number of repeats? <div class="container"> <div class="row"> <?php foreach($page->children as $c) { ?> <div class="col-xs-6 col-md-4"> <h3><?php echo $c->title; ?></h3> <p><?php echo $c->festivals_body; ?> </p><hr> </div> <?php }?> </div> <!-- closing row --> <?php $results = $page->children("start=0, limit=9"); $pagination = $results->renderPager(); echo $pagination; ?> Thanks Link to comment Share on other sites More sharing options...
LostKobrakai Posted August 9, 2015 Share Posted August 9, 2015 The code you posted is a simple loop over children, which has nothing to do with repeater-fields. This should work on a template, where pagination is enabled. <?php $paginatedChildren = $page->children("limit=9"); $pagination = $paginatedChildren->renderPager(); ?> <div class="container"> <div class="row"> <?php foreach($paginatedChildren as $c) { ?> <div class="col-xs-6 col-md-4"> <h3><?php echo $c->title; ?></h3> <p><?php echo $c->festivals_body; ?> </p><hr> </div> <?php }?> </div><!-- closing row --> <?php echo $pagination; ?> </div> Link to comment Share on other sites More sharing options...
deadbeat Posted August 10, 2015 Share Posted August 10, 2015 Thanks still a newbie 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