Skip to main content
6 events
when toggle format what by license comment
Oct 10, 2018 at 7:34 comment added Crafty Cat Hi carlcs, this is a great solution. Can you update your answer for Craft 3 please?
Feb 11, 2016 at 13:34 vote accept carlcs
Nov 19, 2015 at 23:46 comment added Jeremy Daalder Yes, the plugin seems the best way as if someone does a really broad search, hundreds or more entries could come back with the full query. But honestly in our case I think very few would look beyond top 50 search results, so I am simply going to use some limits for now and get some feedback before solving a problem that might not even exist I think. The purist in my wants to solve it, but the 'get this thing done' part of me is currently winning.....for now ;)
Nov 19, 2015 at 22:31 comment added carlcs Yes right, I totally didn't notice that my code doesn't work for arrays of element models. I hope you find a working solution using Twigs slice filter (bracketing), but you could get into troubles with performance using such an approach rather soon. Not sure if there is a way to work with element IDs first, but it's probably tough to get this sorted with your different types. A custom plugin solution would be fastest, as you could query for a subset of your (mixed) elements for each pagination page.
Nov 19, 2015 at 22:02 comment added Jeremy Daalder Just a follow up to this now I look at it in more detail - it's a tad harder when combining two element types because you can't just use the offset + limit approach as easily on the queries -> because you need to do the bracketing on the sorted array. But other than that it seems like it will be much the same.
Nov 19, 2015 at 8:36 history answered carlcs CC BY-SA 3.0