Template:Dmbox/doc: Difference between revisions

no edit summary
No edit summary
No edit summary
 
Line 21: Line 21:


{{dmbox | type = setindex | text = Some text.}}
{{dmbox | type = setindex | text = Some text.}}


Complex example:
Complex example:
Line 28: Line 27:
{{dmbox
{{dmbox
| type      = setindex
| type      = setindex
| image    = {{nowrap| [[Image:Schooner.svg|30px]] [[Image:List gray.svg|30px]] }}
| image    = {{nowrap| [[Image:Schooner.png|30px]] [[Image:DAB list gray.png|30px]] }}
| textstyle = color: red; font-weight: bold; font-style: normal;
| textstyle = color: red; font-weight: bold; font-style: normal;
| text      = The message body text.
| text      = The message body text.
Line 36: Line 35:
{{dmbox
{{dmbox
| type      = setindex
| type      = setindex
| image    = {{nowrap| [[Image:Schooner.svg|30px]] [[Image:List gray.svg|30px]] }}
| image    = {{nowrap| [[Image:Schooner.png|30px]] [[Image:DAB list gray.png|30px]] }}
| textstyle = color: red; font-weight: bold; font-style: normal;
| textstyle = color: red; font-weight: bold; font-style: normal;
| text      = The message body text.
| text      = The message body text.
}}
}}


Some other parameter combinations:
Some other parameter combinations:
Line 54: Line 52:
{{dmbox
{{dmbox
| type = setindex
| type = setindex
| imageright = [[Image:Schooner.svg|33px]]  
| imageright = [[Image:Schooner.png|33px]]  
| text  = type = setindex <br> imageright = <nowiki>[[Image:Schooner.svg|33px]]</nowiki>
| text  = type = setindex <br> imageright = <nowiki>[[Image:Schooner.png|33px]]</nowiki>
}}
}}


{{dmbox
{{dmbox
| type = setindex
| type = setindex
| imageright = [[Image:Schooner.svg|33px]]
| imageright = [[Image:Schooner.png|33px]]
| text  =  
| text  =  
This article includes a [[MozillaWiki: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.
This article includes a [[MozillaWiki: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.
Line 71: Line 69:
{{dmbox
{{dmbox
| type  = disambig / setindex
| type  = disambig / setindex
| image = none / [[Image:Some image.svg|40px]]
| image = none / [[Image:Some image.png|40px]]
| imageright = [[Image:Some image.svg|40px]]
| imageright = [[Image:Some image.png|40px]]
| style = CSS values
| style = CSS values
| textstyle = CSS values
| textstyle = CSS values
Line 82: Line 80:
'''type'''
'''type'''
:If no '''type''' parameter is given the template defaults to type '''disambig'''.
:If no '''type''' parameter is given the template defaults to type '''disambig'''.
:'''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]].
:'''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 [[mw: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]].


:'''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]].
:'''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]].
Line 93: Line 91:
:'''No parameter''' = If no '''image''' parameter is given, the template uses the default disambig or setindex image, depending on the '''type''' parameter.
:'''No parameter''' = If no '''image''' parameter is given, the template uses the default disambig or setindex image, depending on the '''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. (But the message box can handle images of any size.) For example:
:'''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:
::<code><nowiki>image = [[Image:Schooner.svg|30px]]</nowiki></code>
::<code><nowiki>image = [[Image:Schooner.png|30px]]</nowiki></code>
:'''none''' = Means that no image is used.
:'''none''' = Means that no image is used.


Line 135: Line 133:
</div>
</div>
}}
}}


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 [[m:Help:ParserFunctions|parser functions]] and special characters in parameters.  
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 [[m:Help:ParserFunctions|parser functions]] and special characters in parameters.  
Line 146: Line 143:
Other pages:
Other pages:


* [[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.
* [[mw: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.


* {{tl|Disambiguation}} – The generic disambiguation message box.
* {{tl|Disambiguation}} – The generic disambiguation message box.
3,860

edits