froot Posted December 3, 2020 Posted December 3, 2020 I'm having troubles creating a pagination with rows from a ProFields table. $indices = array('title', 'address', 'country'); // those are the fields that I want to search $matches = new PaginatedArray; $category = 'whatever'; $limit = 'limit=25'; $o = '~%='; // the operator :D $q = 'whatever'; foreach ($indices as $i) : $items = $page->table("$i$o$q, category~%=$category"); foreach ($rows as$r) : $matches->add($r); endforeach; endforeach; This works it filters alright with both criteria. I have to do this looping, many other ways failed because multiple selectors don't work with ProFields Table, at least for now. But I can't get it to paginate one way or the other. $pager = $modules->get("MarkupPagerNav"); ?> <div><?php $pager->render($results, $options)?></div> Thanks for help!
kongondo Posted December 3, 2020 Posted December 3, 2020 @fruid, do you not have access to the ProFields forum? 1
froot Posted December 7, 2020 Author Posted December 7, 2020 but here is a general question: When I created a new PaginatedArray; and then ->add($differentItems) // to it, pages and table rows, doesn't matter (or does it?) Then I want to echo $pager->render($rowsAndPages, $options) // but this doesn't work do I use ->setLimit(20) and if so, do I do that before I add the items or after they've been added? Anyhow, page just won't paginate. Thanks for help.
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