default

功能說明
當變數本身為 nil、空字串 ("")、或未定義時,default 會提供一個預設值來避免顯示空內容。


語法

{{ 變數 | default: 預設值 }}

範例

{{ user_name | default: "Guest" }}
Guest