ZionBludd Posted May 18, 2015 Share Posted May 18, 2015 Hi All, my selector appears to break when on pagination pages... E.g. page/page2 Any ideas as to why it would break? Here is my code: <div class="well" style="background-color:#fff"> <div style="border-bottom:1px solid #ededed; padding-bottom:5pt"> <strong><i class="fa fa-star"></i> Top Rated Gyms</strong> </div> <div style="padding-top:5pt"> <? $pa = $pages->find("rating=3|4|5, template=listing-gym, sort=random, limit=10"); foreach ($pa as $p) { echo "<a style='display:block' class='underline' href='$p->path'>$p->title</a>"; } ?> </div> </div> Link to comment Share on other sites More sharing options...
Peter Knight Posted May 19, 2015 Share Posted May 19, 2015 Hi Matt. What's the end result? An error or missing content? If you're experiencing missing content, have a look at the following https://processwire.com/talk/topic/9652-pagination-bug-disappearing-content/ Link to comment Share on other sites More sharing options...
ZionBludd Posted May 19, 2015 Author Share Posted May 19, 2015 Thanks for your reply, Peter! The link that you provided fixed the problems. How would I limit the results to 10, as well as use the limit=n feature? Link to comment Share on other sites More sharing options...
diogo Posted May 19, 2015 Share Posted May 19, 2015 I'm guessing the important part there is the start=0, so just replace n by 10 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