1
我有一個速度模板(在合流用戶宏)的輸出,看起來像:使用一個速度模板的另一個
## This macro takes a jiraissues macro in the body with "Show Total Only" configured to TRUE.
## It then parses the return and puts a green check if the number returned is ZERO or a red X otherwise.
## @noparams
#set ($start = $body.indexOf("{") + 1)
#set ($end = $body.indexOf("}"))
Printf debugging...<br />
body.substring($start, $end) = $body.substring($start, $end) <br />
<ac:rich-text-body>
<ac:image ac:thumbnail="false">
## BUG BUG This substring is ALWAYS zero. Dunno why.
#if ($body.substring($start, $end) == "0")
<ri:url ri:value="/images/icons/emoticons/check.png" />
#else
<ri:url ri:value="/images/icons/emoticons/error.png" />
#end
</ac:image>
</ac:rich-text-body>
該模板具有由用戶配置成嵌套其他速度模板查詢數據庫並返回符合某些條件的錯誤數量。這個想法是,如果返回的數字是零,那麼一切都是虛擬的。否則,呃...你得到的照片。
現在,我的思想中有些東西被搞糊塗了。
- $ body字符串似乎返回的東西看起來像
{0} issues
。 {0}
看起來像一個變量或東西,但地獄,如果我能找到任何文件。
問題
- 哪個模板最先被評估?
- 我甚至可以將一個模板的邏輯基於另一個模板的輸出嗎?
-
爲什麼我的生活是這樣的?沒關係,我知道那個答案。
是的,我不知道。但是你讓我走上了正軌。那個{0}應該是一個死人給我的。謝謝! –