A template standardizing the portal templates and for other purposes. If used for other purposes, note that if the TOC and EDIT parameters are missing or not set to yes, the table of contents and all section editing will be suppressed.
Cú pháp
The template is not a stand-alone template and so once the box header is typed or pasted the template Box-footer must immediately follow it.
This example assumes that you have a separate page containing the content, and transclude it onto the page.
{{Box-header
| title=
| editpage= <!-- Dữ liệu này phải giống nhau -->
| noedit=
| titleforeground=
| titlebackground=
| background=
| viewpage= <!-- Dữ liệu này phải giống nhau -->
}}
{{ <!-- Dữ liệu này phải giống nhau --> }}
{{Box-footer | văn bản }}
This example assumes that the content is entered between the header and footer. Notice that viewpage is not in there. It will not work because it links to the page you are on, and therefore Wikipedia does not link it.
{{Box-header
| title=
| editpage= <!-- Trường này phải giống với tên của trang trên đó. -->
| titleforeground=
| titlebackground=
| background=
}}
Nội dung hộp
{{Box-footer | văn bản }}
Mẫu
{{Box-header
| title= Trích dẫn của trích dẫn
| editpage= Box-header/mẫu
| titleforeground= white
| titlebackground= red
| background= white
}}
{{Box-header/mẫu}}
{{Box-footer| [[William Shakespeare|đọc thêm...]] }}
editpage – by default, the "edit" link applies to the page named Bản mẫu:Box-header/. Use this parameter to specify a different page to edit. This will normally be the page where the {{Box-header}} is used.
noedit – by default, an "edit" link is shown towards the right-hand side. Specify |noedit=yes (or any non-blank value) to hide this. The "edit" link is also hidden if |EDITLINK= is non-blank.
section – by default, the "edit" link applies to the whole page. Use this parameter to specify the number of a specific section, e.g. |section=2
title – the title of the box, for example |title=Portals
top – extra text to display after the "edit" and "view" links. Hidden if |EDITLINK= is non-blank.
viewpage – if non-blank, this should be a valid Wikipedia page name, it creates a "view" link after the "edit" link. Hidden if |EDITLINK= is non-blank.
Tùy chọn hành vi
EDIT – by default, all section edit links are suppressed. Set |EDIT=yes (or any non-blank value) to override this.
EDITLINK – set |EDITLINK=no (or any non-blank value) to hide the "edit" and "view" links, and the text after those
SPAN – by default, the box title is enclosed in <h2>...</h2> tags. Set |SPAN=yes (or any non-blank value) to use <span>...</span> tags instead.
TOC – by default, the table of contents is suppressed. Set |TOC=yes (or any non-blank value) to override this.
Tùy chọn kiểu dáng
background –
background-opacity –
border –
border-top –
border-type –
border-width –
extra –
font-family –
font-size –
foreground –
padding –
padding-top –
padding-left –
padding-right –
padding-bottom –
text-align –
title-align –
titlebackground –
titleborder –
title-font-family –
title-font-size –
titlefont-size –
title-font-weight –
titleforeground –
title-border-radius –
border-radius –
These are all used to set CSS styling properties, in many cases the property of the same name – for instance, |background= is used to set the 'background' property.
The following box-headers are examples of HSV color palettes arranged by hue. They can be copied to your portal's /box-header subpage, or used directly on the portal page (preferred). Note that the second parameter for the edit link is optional; if not defined then no link will be displayed.