TemplateCase – Template
Jump to navigation
Jump to search
Lou Montana (talk | contribs) (Template creation) |
Lou Montana (talk | contribs) m (Text replacement - "<tt>([^ =]+)<\/tt>" to "{{hl|$1}}") |
||
Line 2: | Line 2: | ||
|descr= Adds content depending on the calling page's template. | |descr= Adds content depending on the calling page's template. | ||
|param1= ifTemplate | |param1= ifTemplate | ||
|descr1= content if the page is in the | |descr1= content if the page is in the {{hl|Template:}} namespace | ||
|param2= ifNotTemplate | |param2= ifNotTemplate | ||
|descr2= content if the page is not in the | |descr2= content if the page is not in the {{hl|Template:}} namespace | ||
|example1= <nowiki>{{TemplateCase|this is a template|this is -not- a template}}</nowiki> | |example1= <nowiki>{{TemplateCase|this is a template|this is -not- a template}}</nowiki> | ||
|result1= {{TemplateCase|this is a template|this is -not- a template}} | |result1= {{TemplateCase|this is a template|this is -not- a template}} | ||
}}</noinclude> | }}</noinclude> |
Latest revision as of 10:33, 16 November 2021
Adds content depending on the calling page's template.
This template is used on these pages.
Usage
{{TemplateCase|ifTemplate|ifNotTemplate}}
- ifTemplate: content if the page is in the Template: namespace
- ifNotTemplate: content if the page is not in the Template: namespace
Code | Result |
---|---|
{{TemplateCase|this is a template|this is -not- a template}} | this is a template |