Difference between revisions of "Template:Flagdeco/doc"

From blackwiki
Jump to navigation Jump to search
imported>Andrwsc
(add more examples, since this apparently isn't obvious how the template is helpful)
 
(8 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{documentation subpage}}
+
{{Documentation subpage}}
Displays a flag of the named parameter in "icon" size, currently 22x20 pixels plus a one pixel border. This template is very similar to [[Template:Flagicon]], except the image is not linked to an article, i.e. it is "purely decorative" per [[World Wide Web Consortium]] (W3C) [[Web Content Accessibility Guidelines]] (WCAG). This template can be used when the article text immediately adjacent to the icon provides the associated link for the flag.
+
{{high-use|82,000}}
 +
Displays the flag identified by the parameter in "icon" size, currently 22x20 pixels plus a one pixel border. This template is very similar to {{tl|flagicon}}, except the image is not linked to an article, i.e. it is "purely decorative" per [[World Wide Web Consortium]] (W3C) [[Web Content Accessibility Guidelines]] (WCAG). This template can be used when the article text immediately adjacent to the icon provides the associated link for the flag.
  
 
;Comparison example:
 
;Comparison example:
Line 7: Line 8:
  
 
;Usage examples:
 
;Usage examples:
*<code><nowiki>{{flagdeco|France}} [[Paris]], [[France]]</nowiki></code> → {{flagdeco|France}} [[Paris]], [[France]]
+
*<code><nowiki>{{flagdeco|Portugal}} [[Lisboa]], [[Portugal]]</nowiki></code> → {{flagdeco|Portugal}} [[Lisboa]], [[Portugal]]
*<code><nowiki>{{flagdeco|France}} [[French First Republic|France]]</nowiki></code> → {{flagdeco|France}} [[French First Republic|France]]
+
*<code><nowiki>{{flagdeco|Portugal}} [[Portuguese First Republic|Portugal]]</nowiki></code> → {{flagdeco|Portugal}} [[Portuguese First Republic|Portugal]]
 +
 
 +
As with {{tlf|flagicon}}, a particular variant of the flag and/or a custom size for the icon may be specified using (respectively) {{para|variant}} and/or {{para|size}}. See {{tl|flagicon}} for further details.
 +
 
 +
Also as with {{tlf|flagicon}}, the display of a redlink when <code><nowiki>Template:Country data Foo</nowiki></code>  does not exist can be suppressed by using the  {{para|noredlink|yes}} parameter. See
 +
{{tl|flagicon}} for further details.
 +
 
 +
== Tracking categories ==
 +
Where <code><nowiki>{{Flagdeco|Foo}}</nowiki></code>  is used, but the <code><nowiki>Template:Country data Foo</nowiki></code> does not exist, then a [[WP:REDLINK|redlink]] is displayed, ''unless'' the {{para|noredlink|yes}} parameter has been set.
 +
 
 +
Where the redlink is displayed, the page is addded to a tracking category:
 +
 
 +
* [[:Category:Flagdeco with missing country data templates]] (population: {{PAGESINCATEGORY|Flagdeco with missing country data templates}})
  
 
== See also ==
 
== See also ==
Line 14: Line 27:
 
* [[Wikipedia:Alternative text for images]]
 
* [[Wikipedia:Alternative text for images]]
  
<includeonly>
+
<includeonly>{{Sandbox other||
<!-- ADD CATEGORIES BELOW THIS LINE -->
+
[[Category:Flag template system]]
[[Category:Flag template system|{{PAGENAME}}]]
+
}}</includeonly>
 
 
<!-- ADD INTERWIKIS BELOW THIS LINE -->
 
</includeonly>
 

Latest revision as of 06:36, 21 April 2020

Displays the flag identified by the parameter in "icon" size, currently 22x20 pixels plus a one pixel border. This template is very similar to {{flagicon}}, except the image is not linked to an article, i.e. it is "purely decorative" per World Wide Web Consortium (W3C) Web Content Accessibility Guidelines (WCAG). This template can be used when the article text immediately adjacent to the icon provides the associated link for the flag.

Comparison example
Usage examples

As with {{flagicon}}, a particular variant of the flag and/or a custom size for the icon may be specified using (respectively) |variant= and/or |size=. See {{flagicon}} for further details.

Also as with {{flagicon}}, the display of a redlink when Template:Country data Foo does not exist can be suppressed by using the |noredlink=yes parameter. See {{flagicon}} for further details.

Tracking categories

Where {{Flagdeco|Foo}} is used, but the Template:Country data Foo does not exist, then a redlink is displayed, unless the |noredlink=yes parameter has been set.

Where the redlink is displayed, the page is addded to a tracking category:

See also