Template:If/File/doc
Jump to navigation
Jump to search
Usage
{{If/File}}
functions similarly to the {{#ifexist:}}
conditional. By providing the name of a File. This Template specifically checks to see if the File has Metadata that has been saved in Cargo.
Syntax
{{If/File|File|Conditionally True|Conditionally False}}
{{If/File|File|Conditionally False}}
If only one conditional is provided, it will be assumed to be the False conditional. In such case the True conditional will be the File
Examples
Description | Example | Output |
---|---|---|
Normal usage | {{If/File|Ashura.png|True|False}}
{{If/File|Eshe.png|True|False}}
{{If/File|Bob.png|True|False}}
{{If/File|Steve.png|True|False}}
{{If/File|TheElm.png|True|False}}
{{If/File|Unknown.png|True|False}}
|
True
True False False False True |
True output not required | {{If/File|Ashura.png|Unknown.png}}
{{If/File|Eshe.png|Unknown.png}}
{{If/File|Bob.png|Unknown.png}}
{{If/File|Steve.png|Unknown.png}}
|
Ashura.png
Eshe.png Unknown.png Unknown.png |
Only True conditional | {{If/File|Ashura.png}}
{{If/File|Eshe.png}}
{{If/File|Bob.png}}
{{If/File|Steve.png}}
|
Ashura.png
Eshe.png
|