Okay, so now for ACF <querySlice>, &gt; Descriptio...
# documentation
m
Okay, so now for ACF querySlice,
Description
Returns part of a query object with only the rows you need.
Returns
The number of records from the query object starting from an offset index.
My experience shows that it's returning a query, not a number. These lines contradict one another. @saghosh
s
it should probably say something more like: "Returns: A query object containing the subset of records from the query object you are slicing starting from the offset index."
2
and as a side note.... I didn't even know this function existed.... I could have used this recently
m
It's new since ACF 2018, but I've found it handy for some pagination situations
s
yes, I see that. I had some logic that was used to paginate a grid through a cached query, and it broke while moving from lucee 5.3 to lucee 6... I ended up doing a QoQ to resolve the issue but could have done slice() if I knew it existed.
I guess I should probably make a habit of reading through all the various member functions and things like that more often so I don't forget they exist :)