On 12/27/2013 08:48 PM, Matthew Walker wrote:
I believe Twig does this better than Mustache. Twig does allow for complex for loops and if statements, but it's all about manipulating the rendered output. Try to think how you would implement a pager in Twig vs Mustache. In twig you can pass in a 'page' parameter and using callbacks manipulate the conditions of the foreach loop. In mustache an outside function would have to manipulate the data set before passing it in.
This doesn't seem like a great use case. Almost any realistic pager is going to have too much data to send it all to the client. This even includes a pager of all the revisions of a single article (a lot of pagers in MW have far more pages than that).
That means the paging has to be done server side anyway.
Matt Flaschen