模組:Flag/doc
外觀
此頁面為 Module:Flag 的說明文件
| 此模組文件已評為beta版,可廣泛使用。因其新近完成,請謹慎使用,以確保輸出結果符合預期。 |
| 此模組使用Lua語言: |
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
[編輯]- {{flag}} → {{#invoke:flag|main}}
- {{flagcountry}} → {{#invoke:flag|country}}
- {{flagdeco}} → {{#invoke:flag|deco}}
- {{flagicon}} → {{#invoke:flag|icon}}
- {{flag+link}} → {{#invoke:flag|+link}}
Examples
[編輯]| Template | Module | ||||
|---|---|---|---|---|---|
| Code | Output | TL | Code | Output | TL |
{{flag|China}} |
443b | {{#invoke:flag|main|China}} |
128b | ||
{{flagcountry|China}} |
577b | {{#invoke:flag|country|China}} |
128b | ||
{{flagdeco|China}} |
452b | {{#invoke:flag|deco|China}} |
107b | ||
{{flagicon|China}} |
548b | {{#invoke:flag|icon|China}} |
117b | ||
{{flag+link|History of|China}} |
663b | {{#invoke:flag|+link|History of|China}} |
139b | ||