Vote count: 0
I have recently started to work with play framework and working on a simple web project right now.
I am dealing with HTML templates so far and now I want to move some static values somewhere (f.x. version of application, name of application)
I have found only 3 ways so far:
- Create java get/set object and pass it to template.
- Declare variables inside of template and use them.
- Add variables conf/application.conf
I do not like 1-st and 2-nd and would prefer to use 3-th way, however I do not want to mess with application.conf therefore I was thinking about new config file (like variables.conf or so) where I will save all static variables. I also want to make sure I can deal with i18n in future.
I would be very glad to see either a link where it is described or about todo-steps what needs to be done.
Thanks.
asked 20 secs ago
Good practice of using variables with template
Aucun commentaire:
Enregistrer un commentaire