renderArgs.put("blogBaseline", Play.configuration.getProperty("blog.baseline"));
}
+ public static void showParty(Long id) {
+ Party party = Party.findById(id);
+ render(party);
+ }
+
public static void index() {
List<Party> parties = Party.find(
"order by date desc"
--- /dev/null
+#{extends 'main.html' /}
+#{set title:party.description/}
+
+#{display_party party:party, as:'full' /}
</li>
</ul>
<div id="title">
- <span class="about">About this blog</span>
- <h1><a href="#">${blogTitle}</a></h1>
+ <span class="about">About this application</span>
+ <h1><a href="@{Application.index()}">${blogTitle}</a></h1>
<h2>${blogBaseline}</h2>
- </div>
+ </div>
</div>
<div id="main">
<a href="http://www.playframework.org">Play framework</a>
as a tutorial application.
</p>
-
+
</body>
</html>
<div class="post ${_as == 'teaser' ? 'teaser' : ''}">
<h2 class="post-title">
- <a href="#">${_party.description}</a>
+ <a href="@{Application.showParty(_party.id)}">${_party.description}</a>
</h2>
<div class="post-metadata">
# ~~~~~
blog.title=Yet another blog
blog.baseline=We will write about nothing
+
+# Import the secure module
+module.secure=${play.path}/modules/secure
# Home page
GET / Application.index
+# Party page
+GET /party/{id} Application.showParty
+
+# Import Secure routes
+* / module:secure
+
# Ignore favicon requests
GET /favicon.ico 404