In the file main.html
, in default project created by Play!, there's this line :
#{get 'moreStyles' /}
I understand that if I need to add more styles, in my view script, I have to use
#{set tag:'value' /}
where tag
should be moreStyles
, but it seems worng to set the value to the full HTML <link>
tag. And what happens if the view needs to add more styles, or scripts?
Thanks!
you set more styles with:
like scripts:
simply using the #{set} tag will overwrite the previous values.
that is if you issue
and then
then
will only return yyy
in order to achieve what you want you have to
and then the stylesheet main.css will be added to the previous value of morestyles
On a similar situation I ended up creating my own #{addStyle} tag