Template:Ifsvg: Difference between revisions
Template page
More actions
create an inefficient template, please replace it if there is a better way to do that. |
m Protected "Template:Ifsvg": Widely used template: 165928 transclusion(s) found. ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only template editors and administrators] (indefinite)) |
||
| (7 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{ | {{#ifeq:{{NAMESPACE}}|File | ||
| {{#ifeq:{{#invoke:File|extension|file={{PAGENAME}}}}| svg | {{{1|}}} | {{{2|}}} }} | |||
| {{{3|<noinclude>not file</noinclude>}}} }}<noinclude> | |||
{{documentation}} | |||
</noinclude> | </noinclude> | ||
Latest revision as of 15:05, 6 July 2021
not file
This documentation is transcluded from Template:Ifsvg/doc.
Returns 1st param if the page is an SVG file, 2d parameter if it is a non-SVG file, nothing if it is not a file.
Usage
{{Ifsvg |1= |2= }}
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
1 | value if true | empty | optional | |
2 | value if false | empty | optional | |
Additional information
The template is intended to be used in the following namespaces: the Template namespace
The template is intended to be used by the following user groups: no user group specified