Template:media link

From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search

#2 • {{media link}} Template, Wildgoosespeeder (ended January 8)


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 red link is detected
Media: Media:Alternate screen.png
Check mark.svg X mark.svg Check mark.svg
:File: File:Alternate screen.png
X mark.svg Check mark.svg X mark.svg

That's what this template addresses by bring the best of both worlds together. This template should be used in main articles only!

Use Cases

{{media link}} testing for bugs:

MediaWiki parsing Code
File:Alternate screen.png {{media link|Alternate screen.png}}
File:Alternate screen.png {{media link|Alternate screen.png|}}
test {{media link|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}}


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.