Editing
Template:Dmbox/doc
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Documentation subpage}} {{High-risk| 317,000+ }} <!-- Categories where indicated at the bottom of this page, please; interwikis go to Wikidata (see also: [[Wikipedia:Wikidata]]) --> {{Uses TemplateStyles|Template:Dmbox/styles.css}} {{Mbox templates (small)}} This is the {{tl|Dmbox}} (['''D''']isambiguation footer ['''m''']essage ['''box''']) [[WP:MTM|metatemplate]]. It is used to build [[WP:disambiguation|disambiguation]] and [[Wikipedia:set index article|set index article]] message boxes, such as {{tl|Disambiguation}} and {{tl|Ship index}}. This template works similarly to {{tl|Ambox}} and mostly uses the same parameters. The main differences are that this box uses the disambiguation style and only has two "type" settings. === Usage === Simple usage example: <pre> {{dmbox | text = Some text.}} </pre> {{dmbox | text = Some text.}} <pre> {{dmbox | type = setindex | text = Some text.}} </pre> {{dmbox | type = setindex | text = Some text.}} Complex example: <pre> {{dmbox | type = setindex | image = [[File:Schooner.svg|30px|link=|alt=]] [[File:DAB list gray.svg|30px|alt=Disambiguation icon]] | text = The message body text. }} </pre> {{dmbox | type = setindex | image = [[File:Schooner.svg|30px|link=|alt=]] [[File:DAB list gray.svg|30px|alt=Disambiguation icon]] | text = The message body text. }} Some other parameter combinations: {{dmbox | text = No type and no image given ('''default''') }} {{dmbox | image = none | text = No type and '''image=none''' β No image is used and the '''text''' uses the whole message box area. }} {{dmbox | type = setindex | imageright = [[File:Schooner.svg|33px|link=|alt=]] | text = type = setindex <br> imageright = <nowiki>[[File:Schooner.svg|33px|link=|alt=]]</nowiki> }} {{dmbox | type = setindex | imageright = [[File:Schooner.svg|33px|link=|alt=]] | text = This article includes a [[Wikipedia:WikiProject Ships/Guidelines#Index pages|list of ships]] with the same or similar names. If an [[Special:Whatlinkshere/{{NAMESPACE}}:{{PAGENAME}}|internal link]] for a specific ship referred you to this page, you may wish to change the link to point directly to the intended ship article, if one exists. }} === Parameters === List of all parameters: <syntaxhighlight lang="moin"> {{dmbox | type = disambig / setindex | image = none / [[File:Some image.svg|40px|link=|alt=]] | imageright = [[File:Some image.svg|40px|link=|alt=]] | text = The message body text. | nocat = {{{nocat|}}} / true }} </syntaxhighlight> {{Para|type}} :If no {{Para|type}} parameter is given the template defaults to type {{code|disambig}}. :{{code|disambig}} = Makes it so the {{tl|disambig editintro}} is displayed when editing a page with this template on. (Means that this template internally sets the CSS id "disambigbox". The id is used by the javascript in [[MediaWiki:Common.js]] to determine if a page is a disambiguation page or not.) And adds [[:Category:All disambiguation pages]] and [[:Category:All article disambiguation pages]]. :{{code|setindex}} = Does ''not'' trigger the {{tl|disambig editintro}} when editing a page. (Because this instead sets the CSS id "setindexbox".) And adds [[:Category:All set index articles]]. {{Para|nocat}} :{{code|true}} = [[Wikipedia:Category suppression|Stops this template from categorizing]]. Useful for tests and demonstrations. Dmbox templates should forward{{when defined as}} {{para|nocat}}, so they too have the option to suppress categories. Thus, it is recommended that Dmbox templates always add something similar to this: ::<code><nowiki>nocat = {{{nocat|}}}</nowiki></code> {{Para|image}} :''<span style="color:gray">[No parameter]</span>'' = If no {{Para|image}} parameter is given, the template uses the default {{para|disambig}} or {{para|setindex}} image, depending on the {{Para|type}} parameter. :''An image'' = Should be an image with usual wiki notation. 30px - 50px width are usually about right depending on the image height to width ratio. (Keep the width small; images in this template do not automatically shrink on mobile devices.) For example: ::<code><nowiki>image = [[File:Schooner.svg|30px|link=|alt=]]</nowiki></code> :<code>none</code> = Means that no image is used. {{Para|imageright}} :'''No parameter''' = If no {{Para|imageright}} parameter is given then no image is shown on the right side. :'''An image''' = Should be an image with usual wiki notation. 30px - 50px width are usually about right depending on the image height to width ratio. (Keep the width small; images in this template do not automatically shrink on mobile devices.) For example: ::<code><nowiki>imageright = [[File:Nuvola apps bookcase.png|40px|alt=Books icon]]</nowiki></code> :'''Anything''' = Any other object that you want to show on the right side. {{Para|text}} :The message body text. This message box has ''italic'' text as default, thus no need to manually set that. === Technical details === If you need to use special characters in the text parameter then you need to escape them like this: <syntaxhighlight lang="tid"> {{dmbox | text = <div> Equal sign = and a start and end brace { } work fine as they are. But here is a pipe {{!}} and two end braces <nowiki>}}</nowiki>. And now a pipe and end braces <nowiki>|}}</nowiki>. </div> }} </syntaxhighlight> {{dmbox | text = <div> Equal sign = and a start and end brace { } work fine as they are. But here is a pipe {{!}} and two end braces <nowiki>}}</nowiki>. And now a pipe and end braces <nowiki>|}}</nowiki>. </div> }} For more technical details see the [[Template talk:Dmbox|talk page]]. Since this template works almost exactly like {{tl|ambox}}, {{tl|tmbox}}, {{tl|imbox}}, {{tl|cmbox}} and {{tl|ombox}} their talk pages and related pages might also contain more details. ===See also=== {{Mbox templates see also}} Other pages: * [[Wikipedia:Disambiguation]], which includes a section explaining [[Wikipedia:Disambiguation#Set index articles|set index articles]]. * [[Wikipedia:WikiProject Disambiguation]] * {{tl|Disambiguation}}, the generic disambiguation message box. * {{tl|Set index article}}, the generic set index article message box. <includeonly>{{Sandbox other| | <!-- Categories below this line, please; interwikis at Wikidata --> [[Category:Disambiguation message boxes| ]] [[Category:Set index article templates| ]] [[Category:Mbox and messagebox templates]] }}</includeonly>
Edit summary
(Briefly describe your changes)
Please note that all contributions to A2wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
A2wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Category handler
(
edit
)
Template:Code
(
edit
)
Template:Definition
(
edit
)
Template:Delink
(
edit
)
Template:Dmbox
(
edit
)
Template:Dmbox/styles.css
(
edit
)
Template:Documentation subpage
(
edit
)
Template:Fix
(
edit
)
Template:High-risk
(
edit
)
Template:High-use
(
edit
)
Template:Hlist/styles.css
(
edit
)
Template:Infobox
(
edit
)
Template:Mbox
(
edit
)
Template:Mbox templates (small)
(
edit
)
Template:Mbox templates see also
(
edit
)
Template:Para
(
edit
)
Template:Str left
(
edit
)
Template:Strong
(
edit
)
Template:Template link
(
edit
)
Template:Template link general
(
edit
)
Template:Template link with alternate text
(
edit
)
Template:Template other
(
edit
)
Template:Terminate sentence
(
edit
)
Template:Tl
(
edit
)
Template:Tla
(
edit
)
Template:Tlg
(
edit
)
Template:Uses TemplateStyles
(
edit
)
Template:View
(
edit
)
Template:When defined as
(
edit
)
Module:Arguments
(
edit
)
Module:Category handler
(
edit
)
Module:Category handler/blacklist
(
edit
)
Module:Category handler/config
(
edit
)
Module:Category handler/data
(
edit
)
Module:Category handler/shared
(
edit
)
Module:Delink
(
edit
)
Module:High-use
(
edit
)
Module:Infobox
(
edit
)
Module:Infobox/styles.css
(
edit
)
Module:List
(
edit
)
Module:Message box
(
edit
)
Module:Message box/configuration
(
edit
)
Module:Namespace detect/config
(
edit
)
Module:Namespace detect/data
(
edit
)
Module:Navbar
(
edit
)
Module:Navbar/configuration
(
edit
)
Module:Navbar/styles.css
(
edit
)
Module:String
(
edit
)
Module:TNT
(
edit
)
Module:TableTools
(
edit
)
Module:Template link general
(
edit
)
Module:Transclusion count
(
edit
)
Module:Transclusion count/data/D
(
edit
)
Module:Unsubst
(
edit
)
Module:Uses TemplateStyles
(
edit
)
Module:Uses TemplateStyles/config
(
edit
)
Module:Yesno
(
edit
)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Template
Discussion
English
Views
Read
Edit source
View history
More
Search
Navigation
Main page
Current events
Random page
About A2wiki
interaction
Help
Community portal
Recent changes
Upload file
Tools
What links here
Related changes
Special pages
Page information