參數
- item:要檢查的物件。如果未指定,則使用預設的輸出物件。
- attr:要檢查的屬性名稱。
- action:如果運算式計算結果為 true 時執行的操作。允許的值有:break,continue。
控制屬性
無範例
定義缺少的 title 屬性。另請參閱
- arc:else:建立一個程式碼塊,如果條件不滿足的話則執行該程式碼塊。
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
使用 arc:notnull 檢查指定物件中的屬性是否有值;arc:exists 是此關鍵字的同義詞。
<arc:call op="fileListDir" output="out">
<arc:notnull attr="filename">
<arc:set attr="[title]" value="[filename]"/>
<arc:else>
<arc:set attr="[title]" value="Unnamed file"/>
</arc:else>
</arc:notnull>
<arc:push title="[title]">
[out.file:*]
</arc:push>
</arc:call>