break changes
@renderBody()
does not render layout content now. It’s used to render tag body specifically. To render the layout content, use@doLayout()
or@render()
without section name parameter- Automatic escape expression with html format if the template file name suffix is .html. If your code breaks, try to use
@raw()
tag to surround relevant template part or export your variable with.raw()
extension.- Note auto-escape can cause template execution performance up to 3 times slower(still much faster than groovy) depending on how many expressions there are in your template, but we consider it a good trade-off to offer a secure default behavior. For those people who “need for speed”, simply wrap your entire template content in
raw
block:@raw(){your content comes here}
.
- Note auto-escape can cause template execution performance up to 3 times slower(still much faster than groovy) depending on how many expressions there are in your template, but we consider it a good trade-off to offer a secure default behavior. For those people who “need for speed”, simply wrap your entire template content in
app/view
as template root are no longer supported. All rythm template files must be put intoapp/rythm
folderapp/view/tags/rythm
as tag root are no longer supported. Just put tag files as normal template file intoapp/rythm
folder@section
tag usage:- previously
@section sectionName {...}
- now
@section(“sectionName”) {...}
- previously
New features
- Tag invocation decorations and chain them together
- Template content decorations and chain them together
- Dynamic tag invocation with @invoke keyword
- Call tag body with parameter
- Include other template inline. And now you can reuse inline tag definitions across multiple views
@extends()
directive now has new syntax to specify layout(parent) template- Abort current template executing process and return to caller using
@return
- Break the current loop using
@break
- Continue the current loop using
@continue
- New
Cache4
annotation to mark on controller action method @ts()
output timestamp in place@__simple__
mark the current template as simple template with no implicit variables/imports and does not extend other template- An new demo application with 25 sample cases, with each one has template source and generated java source presented for quick study the Rythm engine
Small enhancements
@verbatim(){}
now escape html code@render[Section]()
now accept default content/section block- Support
@for(int i = 0; i < 100; ++i)
loop style - New alias for Play specific keywords:
@url
: previously@_u
, url reverse lookup@fullUrl
: previously@_au
, url reverse lookup with absolute path@msg
: previously@_m
, i18n message lookup
Issues closed
- https://github.com/greenlaw110/Rythm/issues/6
- https://github.com/greenlaw110/Rythm/issues/21
- https://github.com/greenlaw110/Rythm/issues/14
- https://github.com/greenlaw110/play-rythm/issues/5
- https://github.com/greenlaw110/play-rythm/issues/1
- https://github.com/greenlaw110/play-rythm/pull/11
No comments:
Post a Comment