模板:Ifsubst

文档图示 模板文档[查看] [编辑] [历史] [清除缓存]

用法

作为判断是否透过替换嵌入来呼叫第一或第二参数的元模板。

本模板需在safesubst模式下使用,以维持正确的运作。

{{ {{{|safesubst:}}}ifsubst| yes | no }}

相关模板

subst 辅助模板列表
  • {{require subst}}: 呼出错误值,直到被取代为止。
    • {{subst check top}}, {{subst check bottom}}: Same purpose, but used as a pair.
    • {{subst only}}: For the doc of the above templates; prints a message asking for it be substituted.
    • {{nosubst}}: The reverse of {{subst only}}. For the doc of templates which should not be substituted; prints a message asking for it not to be substituted.
    • {{substitution}}: Allows free-fill description of whether the template should be substituted and under what conditions.
  • {{issubst}}: 若被取代时,呼出“yes”值。
  • {{ifsubst}}: 根据程式码被“取代”与否决定呼出值。