编辑“︁
Template:Flagof/doc
”︁
跳转到导航
跳转到搜索
这是
Flagof
模板的
文档页面
。
警告:
您没有登录。如果您进行任何编辑,您的IP地址会公开展示。如果您
登录
或
创建账号
,您的编辑会以您的用户名署名,此外还有其他益处。
反垃圾检查。
不要
加入这个!
{{Documentation subpage}} {{Lua|Module:Flagg}} This template is similar to {{tl|flag}}, with the main difference that it links to the article on the flag rather than the article on the country. The default link is to "Flag of {{param|alias}}", where {{para|alias}} is the country article name passed by the country's [[:Category:Country data templates|data template]]. == Parameters == === Basic parameters === * {{para|1}} (first unnamed parameter): Name of country or any other entity. If "Template:Country data ..." exists for that entity, data from that template is used for the link and image. === Image parameters === * {{para|variant}} (or second unnamed parameter): Identifies a variant flag image, such as an ensign or a historical flag (for a list of available variants for each entity, see their respective country data templates) * {{para|size}}: Size of the icon. The default size is 32x21px, which is slightly larger than the default size of {{tl|flag}}, {{tl|flagicon}} etc. * {{para|image}}: Custom image name without "File:" prefix. If not specified uses an image from the entity's country data template. * {{para|border}}: Set to nothing to remove the border from a custom image if it's a non-rectangular flag. The border should be automatically deactivated for images from country data templates if necessary (if it isn't the line "<code>|border=</code>" should be added to the data template). === Name and link parameters === * {{para|name}}: Display name (doesn't affect linked article name). Defaults to the value of the first unnamed parameter. * {{para|prefix}}: Set to "yes" to display the "Flag of" prefix. * {{para|link}}: The article to link to. Defaults to "Flag of {{para|alias}}", using the value of {{para|alias}} from the country data template. Set to nothing to omit the link entirely and produce only the flag icon. The link is automatically omitted by default if no first parameter is specified (see last three examples). * {{para|section}}: Links to a section of the linked article * {{para|the}}: Set to "yes" to add the definite article "the" between "Flag of" and the entity name in the link. * {{para|list}}: Set to "yes" if the template is used in a vertical list; this ensures the country names are lined up correctly. == Examples == * {{tlc|flagof|Germany}} → {{flagof|Germany}} * {{tlc|flagof|Georgia}} → {{flagof|Georgia}} (automatically links to [[Flag of Georgia (country)]] because the country article is at [[Georgia (country)]]) * {{tlc|flagof|Ohio}} → {{flagof|Ohio}} (automatically removes the border) * {{tlc|flagof|Australia|size{{=}}23x15px}} → {{flagof|Australia|size=23x15px}} (default size for other flag templates) * {{tlc|flagof|Canada|variant{{=}}1921}} → {{flagof|Canada|variant=1921}} (historical flag) ** Alternatively: {{tlc|flagof|Canada|1921}} → {{flagof|Canada|1921}} (shorter) === Customized name and link === * {{tlc|flagof|Scotland|name{{=}}Saint Andrew's Saltire}} → {{flagof|Scotland|name=Saint Andrew's Saltire}} (custom display name) * {{tlc|flagof|Scotland|prefix{{=}}yes}} → {{flagof|Scotland|prefix=yes}} (displayed prefix) * {{tlc|flagof|United Kingdom|the{{=}}yes}} → {{flagof|United Kingdom|the=yes}} (definite article in link) * {{tlc|flagof|United Kingdom|variant{{=}}naval|link{{=}}White Ensign}} → {{flagof|United Kingdom|variant=naval|link=White Ensign}} (custom linked article) * {{tlc|flagof|Belarus|variant{{=}}1991|section{{=}}White-red-white flag}} → {{flagof|Belarus|variant=1991|section=White-red-white flag}} (links to the section of [[Flag of Belarus]] about the shown flag) * {{tlc|flagof|India|variant{{=}}British|link{{=}}List of Indian flags|section{{=}}British India}} → {{flagof|India|variant=British|link=List of Indian flags|section=British India}} (links to a section of a custom linked article) **Alternatively: {{tlc|flagof|India|variant{{=}}British|link{{=}}List of Indian flags#British India}} → {{flagof|India|variant=British|link=List of Indian flags#British India}} (more intuitive) * {{tlc|flagof|Japan|link{{=}}}} → {{flagof|Japan|link=}} (flag icon only; no link) === Customized image === * {{tlc|flagof|Spain|image{{=}}Flag of Spain (civil).svg}} → {{flagof|Spain|image=Flag of Spain (civil).svg|demo=1}} (custom image for entity with country data template; consider adding the image to the template as a variant if a template exists) * {{tlc|flagof|Belfast|image{{=}}Flag of Belfast.svg}} → {{flagof|Belfast|nodata=1|image=Flag of Belfast.svg}} (entity without country data template; uses the first parameter as alias for the link) * {{tlc|flagof|Denmark|image{{=}}Flag of Denmark (state).svg|border{{=}}}} → {{flagof|Denmark|image=Flag of Denmark (state).svg|border=|demo=1}} (custom image without border) * {{tlc|flagof|image{{=}}Flag of Gozo.svg}} → {{flagof|image=Flag of Gozo.svg}} (no link if there is an image but no first parameter) === Empty image === * {{tlc|flagof}} → {{flagof}} (no parameters at all; uses the empty placeholder flag image from [[Template:Country data ]] without link) * {{tlc|flagof|link{{=}}Flags of Antarctica|name{{=}}Antarctica}} → {{flagof|link=Flags of Antarctica|name=Antarctica}} (empty image with link; {{tl|noflag}}-like) **Alternatively: {{tlc|flagof|Antarctica|image{{=}}}} → {{flagof|Antarctica|image=}} <includeonly>{{Sandbox other|| [[Category:旗幟模板系統]] }}</includeonly>
摘要:
请注意,所有对Local Chinese Wikipedia的贡献均可能会被其他贡献者编辑、修改或删除。如果您不希望您的文字作品被随意编辑,请不要在此提交。
您同时也向我们承诺,您提交的内容为您自己所创作,或是复制自公共领域或类似自由来源(详情请见
Project:著作权
)。
未经许可,请勿提交受著作权保护的作品!
取消
编辑帮助
(在新窗口中打开)
导航菜单
个人工具
未登录
讨论
贡献
创建账号
登录
命名空间
模板
讨论
大陆简体
不转换
简体
繁體
大陆简体
香港繁體
澳門繁體
大马简体
新加坡简体
臺灣正體
查看
阅读
编辑
查看历史
更多
搜索
导航
首页
最近更改
随机页面
MediaWiki帮助
工具
链入页面
相关更改
特殊页面
页面信息