Difference between revisions of "Template:Flagdeco"

From blackwiki
Jump to navigation Jump to search
blackwiki>BrownHairedGirl
(1/ allow noredlink=yes; 2/ Track use where "Template:Country data Foo" does not exist, in Category:Flagdeco with missing country data templates)
blackwiki>BrownHairedGirl
(use {{namespace detect showall}} to stop userpages and talk pages being categorised in Category:Flagdeco with missing country data templates)
Line 14: Line 14:
 
     -->{{country data {{{1|}}}|flagdeco/core|variant={{{variant|{{{2|}}}}}}|size={{{size|}}}}}<!--
 
     -->{{country data {{{1|}}}|flagdeco/core|variant={{{variant|{{{2|}}}}}}|size={{{size|}}}}}<!--
 
           # Track use where "Template:Country data Foo" does not exist
 
           # Track use where "Template:Country data Foo" does not exist
     -->{{#ifexist: Template:Country data {{{1|}}}||[[Category:Flagdeco with missing country data templates]]}}<!--
+
     -->{{#ifexist: Template:Country data {{{1|}}}||{{namespace detect showall
 +
| 1 =
 +
| 2 = [[Category:Flagdeco with missing country data templates]]
 +
| user  = 1
 +
| talk  = 1
 +
| other = 2
 +
}}}}<!--
 
-->}}</includeonly><noinclude>
 
-->}}</includeonly><noinclude>
 
{{DEFAULTSORT:Law by year}}
 
{{DEFAULTSORT:Law by year}}
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 10:38, 16 December 2018


Template documentation[view] [edit] [history] [purge]

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
  • {{flagdeco|Portugal}} [[Lisboa]], [[Portugal]] Lisboa, Portugal
  • {{flagdeco|Portugal}} [[Portuguese First Republic|Portugal]] Portugal

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