Extension:IfTemplates/zh

The IfTemplates extension adds a parser function that tests if a given page contains only template calls. 这可以有很多应用. For example, in your wiki you may be able to make the assumption that any pages that only contain template calls are stubs with no real content.

用法
The extension's usage is similar to the #ifexist parser function. It takes an input string, interprets it as a page title, and returns one of two values depending on whether or not the page contains only templates.



The function evaluates to  if the page exists & contains only templates. 其他情况下判定为. Note that if the page exists but contains no template calls, it evaluates to false.