Template:Media link

From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Usage

Template idea for the prefix Media:.

Media: vs. :File:

Both prefixes display a link instead of embedding the image itself but there are some key differences:

Prefix Sample Special:UnusedFiles prevention Provides a file page link Provides a special link to Special:Upload if a red link has been detected
Media: Media:MK8 Electrodrome Alternate Screen.png
Media:aeilsdfilasjdl.png
Check mark.svg X mark.svg Check mark.svg
:File: File:MK8 Electrodrome Alternate Screen.png
File:aeilsdfilasjdl.png
X mark.svg Check mark.svg X mark.svg

This template addresses these differences by bringing the best of both worlds together. Please note that this template should be used in main articles only.

Use cases

{{media link}} testing for bugs:

MediaWiki parsing Code
File:MK8 Electrodrome Alternate Screen.pngMedia:MK8 Electrodrome Alternate Screen.png {{media link|MK8 Electrodrome Alternate Screen.png}}
File:MK8 Electrodrome Alternate Screen.pngMedia:MK8 Electrodrome Alternate Screen.png {{media link|MK8 Electrodrome Alternate Screen.png|}}
testMedia:MK8 Electrodrome Alternate Screen.png {{media link|MK8 Electrodrome Alternate Screen.png|test}}
[[Media:|test]] {{media link||test}}
[[Media:|File:]] {{media link||}}
[[Media:|File:]] {{media link|}}
[[Media:{{{1}}}|File:{{{1}}}]] {{media link}}
File:aeilsdfilasjdl.png {{media link|aeilsdfilasjdl.png}}
File:aeilsdfilasjdl.png {{media link|aeilsdfilasjdl.png|}}
test {{media link|aeilsdfilasjdl.png|test}}

Other

Uses {{!}}. Also hides media prefix usage with <span> tag and a simple CSS code. Special code implemented if a red link results from the file string specified.