Reputation: 121
In view (may be Application/index.html), I had the content like:
...
<div>${don't need evaluate this content} </div>
...
I don't want Play! evaluate it, only display absolutely this content on screen, so how can I do it ?
Thank Loic and Niels, I have just checked them, both solutions:
#{verbatim}${don't need evaluate this content}#{/verbatim}
and
<div>'${don't need evaluate this content}' </div>
didn't work!
Note that, I use XML in response type.
Upvotes: 3
Views: 391
Reputation: 63
All above didn't work in multilines.
Solution:
${""" ANY
THING
IN HERE"""}
"""
is here-doc expression in Groovy and PHP.
'''
is also here-doc without evaluation.
so, we can also do %{print(''' ${test} ''')}%
Upvotes: 0
Reputation: 54914
I managed to get this working using the following
<div>${don't need evaluate this content}</div>
Upvotes: 3
Reputation: 373
The best practice is to use the verbatim tag:
#{verbatim}${don't need evaluate this content}#{/verbatim}
Upvotes: 1
Reputation: 7309
From my groovy experience I would guess to use simple quotes so
<div>'${don't need evaluate this content}' </div>
But it's not tested. Perhaps \$
works too. At least $
instead of $ should work.
Upvotes: 0