Closed devinrhode2 closed 11 years ago
Hi Devin !
Is it something like partials, but defined right in the template ?
wait... wow, this is the exact concept of partials. Closing.
Glad to hear from you anyway :-)
What's wrong with partials defined within the template? I would LOVE this feature. This should be reopened! Partials are great, but it'd sure be nice to be able to define partials right inside the template that uses them. In most cases, the partials I create are only used by one parent template so it's a lot of extra work to create the partial the way it works right now. Also, a lot of my partials are one-liners. As a result, I often times end up just copy/pasting instead.
actually we should just re-open a clean thread specifically for defining partials inline, care to do the favors @spudly?
See issue #63.
Taking a little inspiration from DerbyJS here.
In derby, and in the multiplex of other templating solutions, you can abstract a chunk of html and use it in various places. Same concept as functions for chunks of code. In derby, it looks like:
Perhaps in mustache this could be like:
Haven't put any thought into the potential syntax of it yet, but what do you guys think? @groue