I am currently "Playing" With the Java Play Framework and would like to know a simple solution to having an online status on the main.html page (this page will be consistent throughout the site e.g. navigation bar, header and footer). At the top of this page I would like an online status for users that are signed in, I am yet to implement authentication as I will probably use an already existing play module to do this. My concern is that would I have to send a variable through to the main.html for every page I implement with this online status.
My main question is how do you store globally accessible variables in play?
Thanks
The renderArgs are available in inherited templates (main.html), so you don't need to pass them with the #{set} tag. Additionally, if you use a @Before method in a superclass of your controller, you could have it populate the renderArgs with the global value. So you'd only have to set it once to make it available in main.html for all of your pages.
I did something similar by writing a FastTag to get the needed information.