When I try to do the following
<var file='String.format("{0}/{1}","x","_test")' />
<render partial=file />
it does not render the partial view. Instead it outputs the following in html response
<render partial=x/_test />
(which tell me that I am missing the double quotes around the file path). However, when I hardcode the partial view file name in my spark view, i.e
<render partial="x/_test" />
it does render the partial view in my final html response (which means that partial file does exists).
I tried the following but ended up without success
[1]
<var file='String.format("\"{0}/{1}\"","x","_test")' />
<render partial=file />
This outputs <render partial="x/_test" /> in the html response
[2]
<var file="'String.format("{0}/{1}","x","_test")'" />
<render partial=file />
This outputs both the line <var file=... /> and <render partial=file /> to html response
[3]
<var file='String.format("{0}/{1}","x","_test")' />
<render partial=${file} />
This renders
<render partial=x/_test /> in html response.
I tried several other combination like putting quotes around file variable in render partial but nothing seems to be working. Can anybody give any pointers as to how to use a variable as a file name to render a partial view ?
--
Thanks,
Jaikishan