Module:Flag/doc

From Project Basis
Jump to navigation Jump to search

This is the documentation page for Module:Flag

Lua-native alternative to popular flag templates. Can be used to reduce post-expand include size of pages with lots of templates, since it avoids calling multilevel templates.

Usage

Generic flag templates

Sports flag templates

Examples

Template Module
Code Output PEIS Code Output PEIS
{{flag|THY}} THY || 443b || {{#invoke:flag||THY}} ||  THY || 128b
{{flag country|THY}}  Thyon || 577b || {{#invoke:flag|country|THY}} ||  Thyon || 128b
{{flag decoration|THY}}/{{flag deco|THY}} || 452b || {{#invoke:flag|decoration|THY}}/{{#invoke:flag|deco|THY}} || || 107b
{{flag icon|THY}} Thyon || 548b || {{#invoke:flag|icon|THY}} || Thyon || 117b
{{flag link|THY|at the 2400 Sports Games}}  Thyon || 497b || {{#invoke:flag|link|THY|at the 2400 Sports Games}} ||  Thyon || 198b
{{flag+link|History of|THY}}  [[Thyon|Thyon]] || 663b || {{#invoke:flag|+link|History of|THY}} ||  Thyon || 139b
{{flag list|SWI}}  SWI 685b {{#invoke:flag|list|SWI}}  SWI 254b
{{flagu|THY}}  THY || 365b || {{#invoke:flag|u|THY}} ||  THY || 162b
{{flag team|MER}}  Methelor (MER) || 804b || {{#invoke:flag|team|MER}} ||  Methelor (MER) || 193b
{{flag athlete|Worut Jamun|MER}}  Worut Jamun (MER) || 617b || {{#invoke:flag|athlete|Worut Jamun|MER}} ||  Worut Jamun (MER) || 210b
{{flag medalist|Andy Murray|MER}} Andy Murray
 Methelor || 469b || {{#invoke:flag|medalist|Andy Murray|MER}} || Andy Murray
 Methelor || 129b
{{flag IOC|CAN|1924 Winter|1}}  Canada (1) 326b {{#invoke:flag|IOC|CAN|1924 Winter|1}}  Canada (1) 163b
{{flag IOC 2|HKG|1954 Asian Games|1}}  Hong Kong (1) 368b {{#invoke:flag|IOC 2|HKG|1954 Asian Games|1}}  Hong Kong (1) 184b
{{flag IOC athlete|Mark Spitz|USA|1972 Summer}}  Mark Spitz (USA) 346b {{#invoke:flag|IOC athlete|Mark Spitz|USA|1972 Summer}}  Mark Spitz (USA) 178b
{{fb|THY}}  Thyon || 560b || {{#invoke:flag|fb|THY}} ||  Thyon || 151b
{{fb-rt|THY}} Thyon  || 482b || {{#invoke:flag|fb-rt|THY}} || Thyon  || 151b
{{fbicon|THY}} Thyon || 444b || {{#invoke:flag|fbicon|THY}} || Thyon national football team || 163b
{{fba|THY}}  [[|Thyon]] || 625b || {{#invoke:flag|fba|THY}} ||  Thyon || 149b
{{fbaicon|THY}} Thyon || 500b || {{#invoke:flag|fbaicon|THY}} || Thyon Football Association || 159b
{{fbw|THY}}  Thyon 318b {{#invoke:flag|fbw|THY}}  Thyon 183b
{{fbw-rt|THY}} Thyon  || 506b || {{#invoke:flag|fbw-rt|THY}} || Thyon  || 190b
{{futsal|THY}}  Thyon || 476b || {{#invoke:flag|futsal|THY}} ||  Thyon || 149b
{{futsal-rt|THY}} Thyon  || 476b || {{#invoke:flag|futsal-rt|THY}} || Thyon  || 156b
{{ru|THY}}  Thyon || 646b || {{#invoke:flag|ru|THY}} ||  Thyon || 210b

Caveats

When used inside a template, parameters from that template are passed to the module. This can be useful in some situations, but can lead to conflicts (for example, if the parent template has a parameter |country= that is unrelated to the flag it is supposed to display). To prevent this behavior, add the |frameonly= parameter to the module call, e.g. {{#invoke:flag|deco|CHN|frameonly=true}}.