Partials vs for loop — best practices
Posted
by Mike
on Stack Overflow
See other posts from Stack Overflow
or by Mike
Published on 2010-06-07T22:00:12Z
Indexed on
2010/06/07
22:12 UTC
Read the original article
Hit count: 461
In coding up your view templates you can render a partial and pass an array of objects to be rendered once per object. OR you can use a For blank in @blank loop. How do you decide when to do which? It seems that if you use a partial for every iterable object you will end up having to modify tons of separate files to make changes to potentially one view. With the loops you can see everything right there in one file.
© Stack Overflow or respective owner