3
我定义的播放1.2.4自定义标签呈现一个表是这样的:多行代码1.2.4
*{ in tagTable.html }*
<table>
<tr>
${_param1}
</tr>
<tr>
${_param2}
</tr>
<tr>
#{list items: _param3, as: 'item'}
<td>${item}</td>
#{/list}
</tr>
</table>
但是,当调用点有它给我一个错误参数分成多行(每个参数可能有点长,所以我不希望它在一行)。
The template /app/views/example.html does not compile :
illegal colon after argument expression; solution: a complex label expression before a colon must be parenthesized
调用网站看起来像:
#{tagTable
param1: 'this is some very long content for one line',
param2: 'this also is some long content',
param3: ['this', 'is', 'a', 'list', 'also']
/}
它工作正常,如果他们是在一行。允许标记定义跨越行的语法是什么(或者我错误地传递了其他东西?)
啊,至少有一个解决方法。我是Play新手,并且有些惊讶,但这并没有起作用。听起来不错。 – 2012-01-31 22:33:53