Playframework: how to use moreScripts and moreStyles

Moin Moin,

actually I am working with the in a project. It is MVC web-framework written in Java. I like it because it’s simple to understand. Ok - maybe better if you already have experience with frameworks like Django or Rails.

What I did not understand a the first glimps is how to use moreScripts and moreStyles in main.html head:

But it’s quite simple because with get one receives the content of a variable and with set, like the name indicates, one sets the value of a variable. The only difference to the variable title in the title-tag above is the fact, that a helper method for JavaScript and CSS files is available. This helper is also setting the path to the files:

Example for moreScripts definition -> public/javascripts

Example for moreStyles definition -> public/stylesheets

Here is the documentation:

Meno, a colleague told not to use anything else than Playframework 1.2.5. So at this moment, I follow this advice ;-)



Published: February 05 2013