I do not know if it's the best way, but could you not prepare all the
arrays and variables and pass those to the first partialLoop, which
passes certain levels to the next nested one and so on?
-Bart
bytte schreef:
I use a partialLoop() to loop through query results in the view. So far so
good.
But for every item returned in the loop, I need to do another database query
that returns another set of results that require a new partialLoop(). In the
end I have a partialLoop() inside a partialLoop() inside a partialLoop().
But to be able to do the above, I have database queries and some php logic
in the view inside every partialLoop() and that doesn't seem right if I want
to follow the MVC principle. Is there a way to solve this?