Template:Portal/doc
更多语言
更多操作
{{#if: |
{{#if:x||
}} |{{#ifeq: doc | doc
|
{{
#ifeq: show | show
| {{
{{#switch:
{{#if:
|
| {{#ifeq:template|
| main
| {{#ifeq:template|template talk
| talk
| template
}}
}}
}}
| main = ambox | talk = tmbox | user = ombox | wikipedia = ombox | image = ombox | mediawiki = ombox | template = ombox | help = ombox | category = cmbox | portal = ombox | other | #default = ombox
}}
| type = notice
| image =
| imageright =
| class =
| style =
| textstyle =
| text = 本文档是Template:Portal的文档子页面 (见{{ #if: Template | template:subjectspace zh | 条目 }}页自身)。
本页包含用法信息、分类和其他非原{{ #if: Template |template:subjectspace zh页面|条目}}的内容。
| small =
| smallimage =
| smallimageright =
| smalltext =
| subst =
| date =
| name =
}}
}}{{
#if:
|
| [[Category:{{
#if: Template
| Template:SUBJECTSPACE ZH
|條目
}}說明文件]]
}}
| }} }} {{#ifeq:|yes
|
{{#ifeq:{{#if:| {{{smallimage}}} | }}|none | | }}{{#if:{{#if: | {{{smallimageright}}} | }} | {{#ifeq:{{#if: | {{{smallimageright}}} | }}|none
||
}}
}}
{{#if:{{#if:| {{{smallimage}}} | }}
| {{#if:| {{{smallimage}}} | }}
| [[File:{{#switch:content
| speedy = Imbox speedy deletion.png
| delete = Imbox deletion.png
| content = Imbox content.png
| style = Imbox style.png
| move = Imbox move.png
| protection = Imbox protection.png
| notice
| #default = Information icon4.svg
}} | {{#ifeq:yes|yes|30x30px|40x40px}} ]]
}} | {{#if:| {{{smalltext}}} | This template is used on {{#if:3,500,000|3,500,000|a very large number of}} pages. To avoid large-scale disruption and unnecessary server load, any changes should first be tested in this template's [[{{#ifeq:doc|doc| Template:Portal | Template:Portal/doc }}/sandbox|/sandbox]] or [[{{#ifeq:doc|doc| Template:Portal | Template:Portal/doc }}/testcases|/testcases]] subpage, or in your own user space. The tested changes can then be added in one single edit to this template. Please consider discussing any changes on {{#if:|[[{{{2}}}]]|the [[{{#ifeq:doc|doc| Template talk:Portal | Template talk:Portal/doc }}|talk page]]}} before implementing them. }} |
{{#if: | {{{smallimageright}}} | }} |
{{#switch:content
| | speedy | delete | content | style | move | protection | notice = | #default = [[Category:需要修复的信息框|Template:Main otherTemplate:Portal/doc]] }}
|
{{#ifeq:|none | | }}{{#if: | {{#ifeq:|none
||
}}
}}
{{#if:
|
| [[File:{{#switch:content
| speedy = Imbox speedy deletion.png
| delete = Imbox deletion.png
| content = Imbox content.png
| style = Imbox style.png
| move = Imbox move.png
| protection = Imbox protection.png
| notice
| #default = Information icon4.svg
}} | {{#ifeq:|yes|30x30px|40x40px}} ]]
}} | This template is used on {{#if:3,500,000|3,500,000|a very large number of}} pages. To avoid large-scale disruption and unnecessary server load, any changes should first be tested in this template's [[{{#ifeq:doc|doc| Template:Portal | Template:Portal/doc }}/sandbox|/sandbox]] or [[{{#ifeq:doc|doc| Template:Portal | Template:Portal/doc }}/testcases|/testcases]] subpage, or in your own user space. The tested changes can then be added in one single edit to this template. Please consider discussing any changes on {{#if:|[[{{{2}}}]]|the [[{{#ifeq:doc|doc| Template talk:Portal | Template talk:Portal/doc }}|talk page]]}} before implementing them. |
{{#switch:content
| | speedy | delete | content | style | move | protection | notice = | #default = [[Category:需要修复的信息框|Template:Main otherTemplate:Portal/doc]] }} }} This template is used to produce a link in a box to a portal or portals.
Parameters
{{Portal|Name 1|Name 2|Name 3...|size=Size|boxsize=Boxsize|margin=Margin}}
Name- The name of the portal. If multiple portal names are used the other parameters will be ignored.
The following additional parameters are available. They are all optional, the default values are chosen to give a good look and feel across the encylopedia and should not be overridden without good reason.
|{{#if:size|size=|}}Size- The width of the icon, as an integer. This is in units of pixels. The default is 28 times the image aspect ratio, which produces an image 28 pixels high.
|{{#if:boxsize|boxsize=|}}Boxsize- The width of the box, as an integer. This is in units of pixels. The default is to use a box wide enough to hold the text, if possible.
|{{#if:margin|margin=|}}Margin- The margin around the box. By default, the box is surrounded by a margin of width 0.5em, but this can be customized using
|{{#if:margin|margin=|}}top right bottom left(e.g.,|{{#if:margin|margin=|}}0.25em 0 0.25em 0.25em) or removed using|{{#if:margin|margin=|}}0(zero).
|{{#if:break|break=|}}Break- If set to "Yes", adds a line break before the word "portal".
Images
The portal image defaults to one that is specified in Template:Portal/Images/PortalName for the portal, or a generic image. There is a list of all such images.
Location
Within articles, this template is meant to be placed at the bottom of the article in the See also section.
Examples
| Code |
Result | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{Portal|Science}}
|
人类学=anthropology | 亚运会=asian games | 天文学=astronomy | 航空=aviation | 经济学=business and economics | 经济=business and economics | 欧洲=europe | 飲食=food | 地理学=geography | 伊斯兰教=islam | 伦敦=london | 医学=medicine | 哲学=philosophy | 物理學|物理=physics | 心理學=psychology | 科學=science | 電視=television | 鐵路=trains | 聯合國=united nations | {{Portal/Images/{{#switch:science | 人类学=anthropology | 亚运会=asian games | 天文学=astronomy | 航空=aviation | 经济学=business and economics | 经济=business and economics | 欧洲=europe | 飲食=food | 地理学=geography | 伊斯兰教=islam | 伦敦=london | 医学=medicine | 哲学=philosophy | 物理學|物理=physics | 心理學=psychology | 科學=science | 電視=television | 鐵路=trains | 聯合國=united nations | Portal.svg}}|36x32px|Science主題]] Science主題首頁 | |
{{Portal|Science|size=15}}
|
人类学=anthropology | 亚运会=asian games | 天文学=astronomy | 航空=aviation | 经济学=business and economics | 经济=business and economics | 欧洲=europe | 飲食=food | 地理学=geography | 伊斯兰教=islam | 伦敦=london | 医学=medicine | 哲学=philosophy | 物理學|物理=physics | 心理學=psychology | 科學=science | 電視=television | 鐵路=trains | 聯合國=united nations | {{Portal/Images/{{#switch:science | 人类学=anthropology | 亚运会=asian games | 天文学=astronomy | 航空=aviation | 经济学=business and economics | 经济=business and economics | 欧洲=europe | 飲食=food | 地理学=geography | 伊斯兰教=islam | 伦敦=london | 医学=medicine | 哲学=philosophy | 物理學|物理=physics | 心理學=psychology | 科學=science | 電視=television | 鐵路=trains | 聯合國=united nations | Portal.svg}}|15x32px|Science主題]] Science主題首頁 | |
{{Portal|Science|boxsize=50}}
|
人类学=anthropology | 亚运会=asian games | 天文学=astronomy | 航空=aviation | 经济学=business and economics | 经济=business and economics | 欧洲=europe | 飲食=food | 地理学=geography | 伊斯兰教=islam | 伦敦=london | 医学=medicine | 哲学=philosophy | 物理學|物理=physics | 心理學=psychology | 科學=science | 電視=television | 鐵路=trains | 聯合國=united nations | {{Portal/Images/{{#switch:science | 人类学=anthropology | 亚运会=asian games | 天文学=astronomy | 航空=aviation | 经济学=business and economics | 经济=business and economics | 欧洲=europe | 飲食=food | 地理学=geography | 伊斯兰教=islam | 伦敦=london | 医学=medicine | 哲学=philosophy | 物理學|物理=physics | 心理學=psychology | 科學=science | 電視=television | 鐵路=trains | 聯合國=united nations | Portal.svg}}|36x32px|Science主題]] Science主題首頁 |
See also
- {{[[{{#switch:
|#default = Portal box
| =
{{#ifeq: |
| Template:Portal box
| Portal box
}}
}}|Portal box]]{{#if:||{{{arg}}}}}}}
- {{[[{{#switch:
|#default = Portal bar
| =
{{#ifeq: |
| Template:Portal bar
| Portal bar
}}
}}|Portal bar]]{{#if:||{{{arg}}}}}}}
- {{[[{{#switch:
|#default = Portal-inline
| =
{{#ifeq: |
| Template:Portal-inline
| Portal-inline
}}
}}|Portal-inline]]{{#if:||{{{arg}}}}}}}