Conversation
|
Hi Adam, Thanks for this pull request - I haven't had a chance to review it yet, but I should in the next few days. Thanks! |
|
Its not the cleanest solution and I didn't have a chance to add more unit tests. |
|
I also noticed that I forgot to use spaces instead of tabs. I used tabs because SpringSource used to use tabs (I'm not sure if they still do). |
|
Will there be any progress on the partials? I'm looking at using a prepackaged template library that's heavily built around a (very nice and clean) partial system, and I'm up for working on the view code as long as it doesn't get too esoteric. |
|
Are you referring to partials support at all or what this patch provides? Partials are already supported. |
|
@chrylis and @sps this patch is to enhance partial support and to add rudimentary layout support. I have mostly switched to Handlebars.java which has its own way of doing layout but we still use Mustache here and there. There are two things this patch does:
Here is an example of the template inheritance: Say we have the views:
... header stuff...
{{> inner}}
... footer stuff...
{{> legal }}
Of course if you don't want return "sub2/c?layout="Or maybe you just want to replace return "sub2/c?legal=sub2/someother-legal" |
I added how it works in the README.MD
I'm using a different version in production but this should work. The partial alias support I added is particularly useful for layout.