h1. PlayRythm module documentation

Welcome to PlayRythm module documentation. This documentation is intended for the *0.9.6 beta release* and may significantly differ from previous module version's documentation.

Check the "version history":history.

h2. PlayRythm features

PlayRythm is yet another template engine plugin for Play!Framework 1.2x version:

# Static and strong typed pure Java template. Yes it's like Japid and Jamon
# Razor like syntax
# Easy to integrate with Play!Framework. There is no special controller needed at all
# Support layout and tag, as you did in Groovy template
# Support FastTags and JavaExtensions with constraints

h2. Template Syntax at a glance

Based on Rythm template engine, PlayRythm module provides an easy to read/write template language which is very like that is used in .Net MVC's "Razor template engine":http://razorengine.codeplex.com/. Here is one rythm template example:

bc. @extends(/main.html);
@args List<User> users;
...
<ul>
@for(User user: users) {
    @if (!user.disabled()) {
        <li class="@user_parity">
            <span>@user_index</span>
            <a href="@_u(User.show(user.getId()))">user.getName()</a>
        </li>
    }
}
</ul>

h2. Use PlayRythm template engine

h3. 1. Add PlayRythm into your @dependencies.conf@ file:

bc. # Application dependencies
   require:
       - play -> rythm

h3. 2. Create the template file in @app/rythm@ folder. The layout of the folder should be the same as your @app/views@ folder.

Rythm can stay with your groovy templates. Given you have controller action @Application.index()@, if you have @Application/index.html@ file put into @app/rythm@ folder, then Rythm template engine will execute it. If not then your @Application/index.html@ file in @app/views@ folder will be picked up and processed by Groovy template engine. Please refer to "Rythm Template User Guide":user_guide for more information

h2. <a name="resource">See Also</a>

# %(next)"Integrate PlayRythm into your Play project":integration%
# "User's guide":user_guide
# "Reference manual":reference
