Template:File link: Difference between revisions
From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
m (Porplemontage moved page Template:Media link to Template:File link: This links to the file page, and since it's used for all files (including images) I want to differentiate from audio/video "media files" and media file templates such as Template:Media table. Plus the word "media" is also used for Template:Media type of media and I want to use it in one fewer instance) |
m (Text replacement - "({{|[Tt]em\|)[Mm]edia link" to "$1file link") |
||
Line 33: | Line 33: | ||
! [[mw:Main Page|MediaWiki]] parsing | ! [[mw:Main Page|MediaWiki]] parsing | ||
|- | |- | ||
| <code><nowiki>{{ | | <code><nowiki>{{file link|MK8 Electrodrome Alternate Screen.png}}</nowiki></code> | ||
| {{{{PAGENAME}}|MK8 Electrodrome Alternate Screen.png}} | | {{{{PAGENAME}}|MK8 Electrodrome Alternate Screen.png}} | ||
|- | |- | ||
| <code><nowiki>{{ | | <code><nowiki>{{file link|MK8 Electrodrome Alternate Screen.png|}}</nowiki></code> | ||
| {{{{PAGENAME}}|MK8 Electrodrome Alternate Screen.png|}} | | {{{{PAGENAME}}|MK8 Electrodrome Alternate Screen.png|}} | ||
|- | |- | ||
| <code><nowiki>{{ | | <code><nowiki>{{file link|MK8 Electrodrome Alternate Screen.png|Test}}</nowiki></code> | ||
| {{{{PAGENAME}}|MK8 Electrodrome Alternate Screen.png|Test}} | | {{{{PAGENAME}}|MK8 Electrodrome Alternate Screen.png|Test}} | ||
|- | |- | ||
| <code><nowiki>{{ | | <code><nowiki>{{file link||Test}}</nowiki></code> | ||
| {{{{PAGENAME}}||Test}} | | {{{{PAGENAME}}||Test}} | ||
|- | |- | ||
| <code><nowiki>{{ | | <code><nowiki>{{file link||}}</nowiki></code> | ||
| {{{{PAGENAME}}||}} | | {{{{PAGENAME}}||}} | ||
|- | |- | ||
| <code><nowiki>{{ | | <code><nowiki>{{file link|}}</nowiki></code> | ||
| {{{{PAGENAME}}|}} | | {{{{PAGENAME}}|}} | ||
|- | |- | ||
| <code><nowiki>{{ | | <code><nowiki>{{file link}}</nowiki></code> | ||
| {{{{PAGENAME}} }} | | {{{{PAGENAME}} }} | ||
|- | |- | ||
| <code><nowiki>{{ | | <code><nowiki>{{file link|Aeilsdfilasjdl.png}}</nowiki></code> | ||
| {{{{PAGENAME}}|Aeilsdfilasjdl.png}} | | {{{{PAGENAME}}|Aeilsdfilasjdl.png}} | ||
|- | |- | ||
| <code><nowiki>{{ | | <code><nowiki>{{file link|Aeilsdfilasjdl.png|}}</nowiki></code> | ||
| {{{{PAGENAME}}|Aeilsdfilasjdl.png|}} | | {{{{PAGENAME}}|Aeilsdfilasjdl.png|}} | ||
|- | |- | ||
| <code><nowiki>{{ | | <code><nowiki>{{file link|Aeilsdfilasjdl.png|Test}}</nowiki></code> | ||
| {{{{PAGENAME}}|Aeilsdfilasjdl.png|Test}} | | {{{{PAGENAME}}|Aeilsdfilasjdl.png|Test}} | ||
|} | |} | ||
[[Category:Formatting templates]]</noinclude> | [[Category:Formatting templates]]</noinclude> |
Revision as of 08:53, June 4, 2024
This template creates a file page link with Special:UnusedFiles prevention, as well as Special:Upload support if the file doesn't exist.
About
:File: vs. Media:
Both prefixes display a link instead of embedding the file itself, but there are some key differences:
Prefix | Sample | Provides a file page link | Special:UnusedFiles prevention | Provides a special link to Special:Upload if a red link has been detected |
---|---|---|---|---|
:File:
|
File:MK8 Electrodrome Alternate Screen.png File:Aeilsdfilasjdl.png |
|||
Media:
|
Media:MK8 Electrodrome Alternate Screen.png Media:Aeilsdfilasjdl.png |
Usage
Testing the template for bugs:
Code | MediaWiki parsing |
---|---|
{{file link|MK8 Electrodrome Alternate Screen.png}}
|
File:MK8 Electrodrome Alternate Screen.png |
{{file link|MK8 Electrodrome Alternate Screen.png|}}
|
File:MK8 Electrodrome Alternate Screen.png |
{{file link|MK8 Electrodrome Alternate Screen.png|Test}}
|
Test |
{{file link||Test}}
|
[[Media:|Test]] |
{{file link||}}
|
[[Media:|File:]] |
{{file link|}}
|
[[Media:|File:]] |
{{file link}}
|
[[Media:{{{1}}}|File:{{{1}}}]] |
{{file link|Aeilsdfilasjdl.png}}
|
File:Aeilsdfilasjdl.png |
{{file link|Aeilsdfilasjdl.png|}}
|
File:Aeilsdfilasjdl.png |
{{file link|Aeilsdfilasjdl.png|Test}}
|
Test |