[英]TYPO3 Fluid Templates variables
我正在嘗試在 Fluid 模板中設置一個變量。 我嘗試將某些東西除以 2:
<f:variable name="hmc">{menu->f:count()} / 2</f:variable>
它不起作用,因為我得到的是字符串而不是數字結果。
我認為你不能在一行中做到這一點。 你必須先數數,然后做數學。
<f:variable name="count">{menu -> f:count()}</f:variable>
<f:variable name="hmc">{count / 2}</f:variable>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.