Template:Box-header
{{{title}}}
This template is used on many pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
This template uses Lua: |
Usage
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.
Syntax
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= <!-- This data must be the same -->
| noedit=
| titleforeground=
| titlebackground=
| background=
| viewpage= <!-- This data must be the same -->
}}
{{ <!-- This data must be the same --> }}
{{Box-footer | text }}
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= <!-- This field must be the same as the name of the page it is on. -->
| titleforeground=
| titlebackground=
| background=
}}
Box Content
{{Box-footer | text }}
Sample
{{Box-header
| title= The Quotes of Quotes
| editpage= Box-header/sample
| titleforeground= white
| titlebackground= #36c
| background= white
}}
{{Box-header/sample}}
{{Box-footer| [[w:William Shakespeare|more...]] }}
The Quotes of Quotes
Doubt thou the stars are fire. Doubt that the sun doth move. Doubt truth to be a liar. But never doubt my love.
Primary parameters
- editpage – by default, the "edit" link applies to the page named /. 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.
Behaviour options
- 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.
Styling options
- 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.
See also
{{Box-footer}}
Tracking categories
Colour combinations with poor accessibility are tracked in the following categories:
- Category:Box-header with insufficient title contrast
- Category:Box-header with insufficient body contrast
TemplateData
|
---|
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Box-header in articles based on its TemplateData.
TemplateData for Box-header <templatedata> { "params": { "border-type": { "required": false, "label": "Border-type" }, "titleborder": { "required": false, "label": "Titleborder" }, "border": { "required": false, "label": "Border" }, "border-top": { "required": false, "label": "Border-top" }, "border-width": { "required": false, "label": "Border-width" }, "titlebackground": { "required": false, "label": "Titlebackground" }, "titleforeground": { "required": false, "label": "Titleforeground" }, "padding": { "required": false, "label": "Padding" }, "padding-top": { "required": false, "label": "Padding-top" }, "padding-left": { "required": false, "label": "Padding-left" }, "padding-right": { "required": false, "label": "Padding-right" }, "padding-bottom": { "required": false, "label": "Padding-bottom" }, "title-align": { "required": false, "label": "Title-align" }, "font-family": { "required": false, "label": "Font-family" }, "titlefont-size": { "required": false, "label": "Titlefont-size" }, "EDITLINK": { "required": false, "label": "EDITLINK" }, "font-size": { "required": false, "label": "Font-size" }, "noedit": { "required": false, "label": "Noedit" }, "editpage": { "required": false, "label": "Editpage" }, "section": { "required": false, "label": "Section" }, "viewpage": { "required": false, "label": "Viewpage" }, "top": { "required": false, "label": "Top" }, "SPAN": { "required": false, "label": "SPAN" }, "title-font-family": { "required": false, "label": "Title-font-family" }, "title-font-size": { "required": false, "label": "Title-font-size" }, "title-font-weight": { "required": false, "label": "Title-font-weight" }, "extra": { "required": false, "label": "Extra" }, "title": { "required": true, "label": "Title" }, "background": { "required": false, "label": "Background" }, "background-opacity": { "required": false, "label": "Background-opacity" }, "foreground": { "required": false, "label": "Foreground" }, "text-align": { "required": false, "label": "Text-align" }, "TOC": { "required": false, "label": "TOC" }, "EDIT": { "required": false, "label": "EDIT" }, "title-border-radius": { "label": "Title's border radius", "example": "1.5em 1.5em 0 0", "type": "string" }, "border-radius": { "label": "Content's border radius", "example": "0 0 1.5em 1.5em", "type": "string" } } } </templatedata> |