Jump to content

Template:Colored box

From Wikitech
{{{title}}}

{{{content}}}

Template documentation

This template is for community pages

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
background-content-colorbackground-content-color

no description

Unknownoptional
extra classesclass

Extra CSS classes to apply to the outermost box (space-separated). This is mainly for other templates using TemplateStyles so that they can scope their CSS to the box, but it may be useful in other cases as well.

Lineoptional
extra stylesstyle

Extra inline CSS rules to apply to the outermost element. Prefer TemplateStyles and using CSS classes if possible when using this template in another template.

Lineoptional
background-title-colorbackground-title-color

no description

Unknownoptional
iconicon

no description

Fileoptional
Title texttitle

no description

Stringrequired
Title linktitle-link

Turn title area into a clickable link

Page nameoptional
title-colortitle-color

no description

Stringoptional
view-linkview-link link

Create a "view" corner link to a given page.

Page nameoptional
view-extlinkview-extlink link2

Create a "view" corner link to a external URL. This cannot be used together with "view-link".

URLoptional
view-textview-text

Replace link text for "view-link" with something other than "view".

Stringoptional
link-colorlink-color

no description

Unknownoptional
Contentcontent

no description

Contentrequired

Examples

Example: Title

{{Colored box|title=TITLE|content=CONTENT}}
{{Colored box
|title=TITLE
|title-link=MediaWiki
|content=CONTENT
}}
TITLE

CONTENT

CONTENT

{{Colored box|title=TITLE|view-link=MediaWiki|content=CONTENT}}
{{Colored box|title=TITLE|view-link=MediaWiki|view-text=HELLO|content=CONTENT}}
{{Colored box|title=TITLE|view-extlink=https://mediawiki.org|view-text=HELLO|content=CONTENT}}
TITLE

CONTENT

TITLE

CONTENT

TITLE

CONTENT

Example: Everything

Icon, title link, custom view-link text

{{Colored box
|icon=OOjs_UI_icon_download-progressive.svg
|title=TITLE
|title-link=MediaWiki
|view-link=MediaWiki
|view-text=HELLO
|content=CONTENT
}}

{{{content}}}

See also