Template:AvatarFor: Difference between revisions
Created page with "{{#ifexist:{{{1}}}/Avatar|{{:{{{1}}}/Avatar}}|{{#ifexist:File:{{{1}}}.png|[[File:{{{1}}}.png|link={{{1}}}]]}}<noinclude> <templatedata> { "params": { "1": { "aliases": [ "user", "name" ], "label": "Name", "description": "The name of the person.", "type": "string", "required": true } }, "description": "Helper template to find a user's Avatar. Looks for their `Username/Avatar` subpage first, then falls back to looking for `Username.png`.",..." |
No edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{# | <includeonly>{{#if: {{#show: {{{1}}} |?Has Avatar#-= |mainlabel=- }} | [[{{#show: {{{1}}} |?Has Avatar#-= |mainlabel=- }}|link={{{1}}}]]}}</includeonly><noinclude> | ||
== Example == | |||
E.g: | |||
<nowiki>{{AvatarFor|Joseph Anderson}}</nowiki> | |||
{{AvatarFor|Joseph Anderson}} | |||
== Template Data == | |||
<templatedata> | <templatedata> | ||
{ | { | ||
"params": { | "params": { | ||
"1": { | "1": { | ||
"label": "Name", | "label": "Name", | ||
"description": "The name of the person.", | "description": "The name of the person.", | ||
Line 14: | Line 16: | ||
} | } | ||
}, | }, | ||
"description": "Helper template to find a user's Avatar. | "description": "Helper template to find a user's Avatar. The user can set this by having an infobox with their avatar shown.", | ||
"format": "inline" | "format": "inline" | ||
} | } | ||
</templatedata> | </templatedata> | ||
</noinclude> | </noinclude> |