Note the upgraded forum! If you are experiencing issues logging in, you may need to reset your password which should send an email. If the email doesn't arrive, be sure to check your spam folder just in case.

How to implement a Load More pagination in news module

edited December 2017 in Modules
I would like implement a Load More pagination in news module but end up being confused how to implement it in fuelcms.
I have generated the news module in CLI.
And this is how my view for fuel/application/views/news.php:
<section id="newsfeed" class="bg-white"> <div class="container"> <div class="row"> <div class="col-md-12 no-padding" id="news-block-waterfall"> <?php $posts = fuel_model('news', array('find' => 'all', 'limit' => 9, 'order' => 'featured, date_added desc')) ?> <?php if (!empty($posts)) : ?> <?php foreach($posts as $post) : ?> <div class="col-md-4 col-sm-6 news-block"> <a class="news-block-inner" href="<?php echo $post->url; ?>"> <span class="image" style="background-image: url(<?php echo $post->image_path; ?>);"> </span> <div class="thumb-desc"> <span class="subtitle"> <span><?=$post->tag?>. </span><?=$post->publish_date_formatted('d M Y')?> </span> <span class="title"> <?php echo $post->title; ?> </span> </div> </a> </div> <?php endforeach; ?> </div> <div class="block-pager block-pager-load"> <a href="#" class="btn btn-lg btn-red">Load more</a> </div> <?php else: ?> <div class="no_posts"> <p>There are no posts available.</p> </div> <?php endif; ?> </div> </div> </section>

And here is the site reference for load more pagination in codeigniter:

It would be great if anyone could guide me to achieve this pagination. Thanks in advance.


Sign In or Register to comment.