https://www.limswiki.org/index.php?title=Template:Dmbox/doc&feed=atom&action=historyTemplate:Dmbox/doc - Revision history2024-03-28T11:42:12ZRevision history for this page on the wikiMediaWiki 1.36.1https://www.limswiki.org/index.php?title=Template:Dmbox/doc&diff=5059&oldid=prevShawndouglas: Added as necessary for disambigs.2011-09-21T22:08:27Z<p>Added as necessary for disambigs.</p>
<p><b>New page</b></p><div>{{Documentation subpage}}<br />
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --><br />
<br />
{{mbox templates}}<br />
This is the {{tl|dmbox}} or '''disambiguation footer message box''' meta-template.<br />
<br />
It is used to build disambiguation and set index article boxes, such as {{tl|disambig}} and {{tl|shipindex}}. <br />
<br />
This template works similarly to {{tl|ambox}} and mostly uses the same parameters. The main differences are that this box uses the disambig style and only has two "type" settings.<br />
<br />
=== Usage ===<br />
Simple usage example:<br />
<br />
<pre><br />
{{dmbox | text = Some text.}}<br />
</pre><br />
<br />
{{dmbox | text = Some text.}}<br />
<br />
<pre><br />
{{dmbox | type = setindex | text = Some text.}}<br />
</pre><br />
<br />
{{dmbox | type = setindex | text = Some text.}}<br />
<br />
<br />
Complex example:<br />
<br />
<pre><br />
{{dmbox<br />
| type = setindex<br />
| image = {{nowrap| [[Image:Schooner.svg|30px]] [[Image:List gray.svg|30px]] }}<br />
| textstyle = color: red; font-weight: bold; font-style: normal;<br />
| text = The message body text.<br />
}}<br />
</pre><br />
<br />
{{dmbox<br />
| type = setindex<br />
| image = {{nowrap| [[Image:Schooner.svg|30px]] [[Image:List gray.svg|30px]] }}<br />
| textstyle = color: red; font-weight: bold; font-style: normal;<br />
| text = The message body text.<br />
}}<br />
<br />
<br />
Some other parameter combinations:<br />
<br />
{{dmbox<br />
| text = No type and no image given ('''default''')<br />
}}<br />
{{dmbox<br />
| image = none<br />
| text = No type and '''image=none''' – No image is used and the '''text''' uses the whole message box area.<br />
}}<br />
<br />
{{dmbox<br />
| type = setindex<br />
| imageright = [[Image:Schooner.svg|33px]] <br />
| text = type = setindex <br> imageright = <nowiki>[[Image:Schooner.svg|33px]]</nowiki><br />
}}<br />
<br />
{{dmbox<br />
| type = setindex<br />
| imageright = [[Image:Schooner.svg|33px]]<br />
| text = <br />
This article includes a 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.<br />
}}<br />
<br />
=== Parameters ===<br />
List of all parameters:<br />
<br />
<pre><br />
{{dmbox<br />
| type = disambig / setindex<br />
| image = none / [[Image:Some image.svg|40px]]<br />
| imageright = [[Image:Some image.svg|40px]]<br />
| style = CSS values<br />
| textstyle = CSS values<br />
| text = The message body text. <br />
| nocat = {{{nocat|}}} / true<br />
}}<br />
</pre><br />
<br />
'''type'''<br />
:If no '''type''' parameter is given the template defaults to type '''disambig'''. <br />
:'''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]].<br />
<br />
:'''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]].<br />
<br />
'''nocat'''<br />
:'''true''' = Stops this template from categorizing. Useful for instance when only testing or demonstrating this template. Templates that use this template should forward '''nocat''', so they too understand nocat. So always add this: <br />
::<code><nowiki>nocat = {{{nocat|}}}</nowiki></code><br />
<br />
'''image'''<br />
:'''No parameter''' = If no '''image''' parameter is given, the template uses the default disambig or setindex image, depending on the '''type''' parameter.<br />
:'''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. (But the message box can handle images of any size.) For example: <br />
::<code><nowiki>image = [[Image:Schooner.svg|30px]]</nowiki></code><br />
:'''none''' = Means that no image is used.<br />
<br />
'''imageright'''<br />
:'''No parameter''' = If no '''imageright''' parameter is given then no image is shown on the right side.<br />
:'''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. (But the message box can handle images of any size.) For example: <br />
::<code><nowiki>imageright = [[Image:Nuvola apps bookcase.png|40px]]</nowiki></code><br />
:'''Anything''' = Any other object that you want to show on the right side.<br />
<br />
'''style'''<br />
:Optional CSS values used by the entire message box table. Without quotation marks <code>" "</code> but with the ending semicolons <code>;</code>. For example:<br />
::<code>style = margin-bottom: 0.2em;</code><br />
<br />
'''textstyle'''<br />
:Optional CSS values used by the text cell. For example:<br />
::<code>textstyle = text-align: center;</code><br />
<br />
'''text'''<br />
:The message body text. This message box has ''italic'' text as default, thus no need to manually set that.<br />
<br />
=== Technical details ===<br />
This template currently uses hard coded styles and class names. Later it will only use CSS classes making it easier to skin. (In the meantime it can be skinned by using the "<code>!important</code>" keyword.)<br />
<br />
If you need to use special characters in the text parameter then you need to escape them like this: <br />
<br />
<pre><br />
{{dmbox<br />
| text = <div><br />
Equal sign = and a start and end brace { } work fine as they are. <br />
But here is a pipe {{!}} and two end braces &lt;nowiki>}}&lt;/nowiki>. <br />
And now a pipe and end braces &lt;nowiki>|}}&lt;/nowiki>.<br />
</div><br />
}}<br />
</pre><br />
<br />
{{dmbox<br />
| text = <div><br />
Equal sign = and a start and end brace { } work fine as they are. <br />
But here is a pipe {{!}} and two end braces <nowiki>}}</nowiki>. <br />
And now a pipe and end braces <nowiki>|}}</nowiki>.<br />
</div><br />
}}<br />
<br />
<br />
Internally, this meta-template uses HTML markup instead of wiki markup for the table code. That is the usual way we make meta-templates since wiki markup has several drawbacks. For instance it makes it harder to use parser functions and special characters in parameters. <br />
<br />
For more technical details see the [http://en.wikipedia.org/wiki/Template_talk:Dmbox|Wikipedia-based talk page]. Since this template works almost exactly like {{tl|ambox}}, {{tl|tmbox}}, {{tl|imbox}}, {{tl|cmbox}} and {{tl|ombox}} their associated Wikipedia talk pages and related pages might also contain more details.<br />
<br />
=== See also ===<br />
{{Mbox templates see also}}<br />
<br />
Other pages:<br />
<br />
* [http://en.wikipedia.org/wiki/Wikipedia:Disambiguation Wikipedia:Disambiguation] – Also has a section explaining set index articles.<br />
* [http://en.wikipedia.org/wiki/Wikipedia:WikiProject_Disambiguation Wikipedia:WikiProject Disambiguation]<br />
* [[MediaWiki:Disambiguationspage]] – Should list all disambiguation message boxes, so that some automatic tools can know what pages are disambiguation pages. Now also has a separate list with all set index message boxes, so some tools can know what pages are set index articles.<br />
<br />
* {{tl|disambig}} – The generic disambiguation message box.<br />
* {{tl|SIA}} – The generic set index article message box.<br />
<br />
<includeonly><br />
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS --><br />
[[Category:Disambiguation message boxes| ]]<br />
<br />
<br />
</includeonly></div>Shawndouglas