I want to include an html file in a view and pass parameters to that include.
Can i pass parameters when using: (?)
#{include 'page.html' /}
Something along the lines of a jsp:include where you can specify which parameters you want to pass.
example: In the same page do something like
<jsp:include page="page.jsp">
<jsp:param name="a" value="aValue"/>
<jsp:param name="b" value="bValue"/>
<jsp:param name="c" value="cVlaue"/>
</jsp:include>
<jsp:include page="page.jsp">
<jsp:param name="a" value="aOtherValue"/>
<jsp:param name="b" value="bOtherValue"/>
</jsp:include>
Thanks.
If you want to pass parameters, then you are better off making a groovy tag, rather than creating an include.
More information can be found on the Play documentation – http://www.playframework.org/documentation/1.2.4/templates#tags
Basically, though, you would do the following
Then, in the following file
app/views/tags/mytag.html, you would add the following (note the underscores)