Closed jcubic closed 7 years ago
Exactly what's stopping you from implementing it?
I don't know how to pass number 10
from pagination
helper to for
helper and count of foo from for
to pagination
helper.
well, php is not multithreaded so you can implement a global state to pass info between the two. Still, it is very bad idea. Why a helper that is inside another one should be passing data to its wrapper to modify its behavior? It's very odd implementation.
I might suggest pagination should be handled by the model responsible for the data passed to the template on render, rather than handling this in Handlebars.
Indeed. I am closing this.
I want to implement
for
helper that will work the same as each but I want it to have pagination helper inside that will modify for behavior for instance:that will render 10 items from foo and and display pagination html (link previous next and numbers between). pagination should allow for custom template like:
is it possible to create helpers like
for
andpagination
?