Jump to content

Template:Infobox Ferret/mugshot: Difference between revisions

From Ferret Software Wiki
m Nelas moved page Template:Infobox Ferret mugshot to Template:Infobox Ferret/mugshot without leaving a redirect: Author request
Gorasuhl (talk | contribs)
update category -> Category name should be plural (Ferrets) not singular (Ferret)
 
Line 2: Line 2:
{{#if: {{{ferret-name|}}}|
{{#if: {{{ferret-name|}}}|
{{!}} colspan="2" class="infobox-centered" {{!}}
{{!}} colspan="2" class="infobox-centered" {{!}}
{{#ifexist: File:{{{ferret-name|}}}_Mugshot.png | [[File:{{{ferret-name|}}}_Mugshot.png|192px]] | [[File:Unknown_Mugshot.png|192px]]  {{#if:{{#var:noCategories}}||[[Category:Ferret lacking infobox images]]}} <br><br> Missing: [[File:{{{ferret-name|}}}_Mugshot.png|192px]]}}}}
{{#ifexist: File:{{{ferret-name|}}}_Mugshot.png | [[File:{{{ferret-name|}}}_Mugshot.png|192px]] | [[File:Unknown_Mugshot.png|192px]]  {{#if:{{#var:noCategories}}||[[Category:Ferrets lacking infobox image]]}} <br><br> Missing: [[File:{{{ferret-name|}}}_Mugshot.png|192px]]}}}}
</includeonly><noinclude>
</includeonly><noinclude>
{{Doc}}
{{Doc}}
[[Category:Infobox part templates]]
[[Category:Infobox part templates]]
</noinclude>
</noinclude>

Latest revision as of 11:49, 3 April 2025

Documentation

Displays a centered image with colspan 2 in an Infobox Ferret.

Usage

{{Infobox mugshot ferret|ferret-name = }}

Parameter

Parameter Data Type Default Value Description
ferret-name String Name of the Ferret

How it works

Filename Ferretname_Mugshot.png for the Image will be created automatically using ferret-name parameter and adding _Mugshot.png to it. If the File doesn't exist, File:Unknown_Mugshot.png will be used as a placeholder, the Infobox will display the missing file below the placeholder and the page will be added to Category:Ferrets lacking infobox image.

Image size should be approx. 190x230 px

Example

{{Infobox mugshot ferret|ferret-name = Badger}}

Displays the Image File:Badger_Mugshot.png of Badger.

If the Ferret has a Mugshot, the Infobox will look like this: Infobox Ferret - Ferret with Mugshot

If the Ferret has no Mugshot, the Infobox will look like this: Infobox Ferret - Ferret without Mugshot