-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Idea: named html chunks #59
Comments
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
The text was updated successfully, but these errors were encountered: