Template:Ifsubst
Jump to navigation
Jump to search
[edit] [ ] Template documentation
This documentation is transcluded from Template:Ifsubst/doc. (edit | history)
Editors can experiment in this template's sandbox (create) and test cases (create) pages.
Subpages of this template.
Editors can experiment in this template's sandbox (create) and test cases (create) pages.
Subpages of this template.
Description
This branches depending on whether the template is being substituted.
One practical application is for substituting the stylesheets of templates using TemplateStyles. A simpler inline style could be used instead, to reduce the bulk of the code generated.
Usage
{{ safesubst:<noinclude/>ifsubst| yes | no }}
Where yes is code to run if substituted and no is code to run if not substituted.