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