1
我有這樣一行模板:如何在TYPO3流體模板中調用實體方法?
<f:format.htmlentitiesDecode>
{product.features}
</f:format.htmlentitiesDecode>
其中「功能」就是「產品」的數據模型的屬性。
我想打印結果,而不是調用產品的方法。例如:
<f:format.htmlentitiesDecode>
{product.getStrippedFeatures}
</f:format.htmlentitiesDecode>
但是,這給了我空的內容。
如何在產品模型中調用方法並打印其輸出?
流體看起來也爲前綴'是'和'擁有'。 – Daniel
流體使用「get」前綴調用屬性的部分完成了這個訣竅 - **謝謝!我想添加一個視圖幫助器,但現在正在工作。 ViewHelper:(http://stackoverflow.com/questions/24612883/how-to-access-a-method-and-pass-an-argument-within-the-template) – t3o
呃我太遲了^^ –