Open Unicycle World Wiki
Advertisement

{{

 Skriptfehler: Ein solches Modul „Namespace detect“ ist nicht vorhanden.

| type = notice | image = Datei:Edit-copy green.svg | imageright = | class = | style = | textstyle = | text = Dies ist eine documentation Unterseite für Vorlage:Dokumentation.
Sie enthält Informationen zur Verwendung, Kategorien und anderen Inhalt, der nicht Teil der originalen vorlage page ist. | small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }}

This is the {{Dokumentation}} Vorlage.

For most of the instructions about how and when to use this Vorlage, see Wikipedia:Vorlage Dokumentation.

This Vorlage displays a green doc box like you are seeing now, and automatically loads the content from a /doc Unterseite. It can also load the content from other places if instructed to.

This Vorlage is intended for documenting Vorlagen and other pages which are transcluded onto other pages. It can be used in Vorlage space and most other namespaces.

Use of this Vorlage allows Vorlagen to be protected where necessary, while allowing anyone to edit the Dokumentation and Kategorien.

Usage[]

Normally this Vorlage is used without any parameters, placed at the bottom of the Vorlage or page being documented, within <noinclude>:

<!--Last line of your Vorlage code--><noinclude>

{{Dokumentation}}
<!-- Add Kategorien to the /doc Unterseite and interwikis in Wikidata, not here! -->
</noinclude>

Then this Vorlage automatically loads the content from the /doc Unterseite of the Vorlage it is used on.

This Vorlage can also load the content from any other page. Like this:

<!--Last line of your Vorlage code--><noinclude>

{{Dokumentation |Vorlage:Other page/doc}}
</noinclude>

Note that when loading the Dokumentation from another page than the local /doc page it becomes tricky to handle the Kategorien and interwiki links.

The content can also be fed directly as text. Like this:

<!--Last line of your Vorlage code--><noinclude>

{{Dokumentation |content=
Some Dokumentation text.
}}
</noinclude>

When the |content= parameter is used, the doc box normally does not show the [edit] [purge] links in the top right corner. Note that if the /doc page exists a link to it is still shown in the link box below the doc box.

Parameter |1= and the |content= parameter can also be combined, like this:

<!--Last line of your Vorlage code--><noinclude>

{{Dokumentation
|1=Vorlage:Any page/doc
|content=
{{Vorlage:Any page/doc |parameters}}
}}
</noinclude>

Then the pagename fed as parameter 1 is used for the [edit] [purge] links and for the /doc link in the link box below the doc box. But the content parameter is used for the content shown in the doc box. The above code means that the content is transcluded as {{Vorlage:Any page/doc|parameters}}. In this example a parameter is also fed to the /doc page being loaded.

Best practice[]

The code should be added at the bottom of the Vorlage code, with no space before <noinclude> (which would cause extra space on pages where the Vorlage is used).

Kategorien and interwiki links that apply to the Vorlage itself should be added to the bottom of the /doc Unterseite, inside <includeonly>...</includeonly> tags. For more complex cases, see Wikipedia:Vorlage Dokumentation#Kategorien and interwiki links.

If the Dokumentation page contains <includeonly> or <noinclude> tags as part of the visible Dokumentation text, replace the "<" with "&lt;".

The heading[]

When in the Vorlage namespace, this Vorlage shows this heading:

Datei:Vorlage-info.png Vorlage Dokumentation

In most other namespaces, such as "Wikipedia:", it shows this heading:

Dokumentation

But when on File (image) pages it shows this heading:

Summary

The heading parameter can be used to set the heading to something else. Like this:

{{Dokumentation |heading=Infobox Dokumentation}}

If the heading parameter is empty but defined, no heading is shown and no [edit] [purge] links are shown. Like this:

{{Dokumentation |heading=}}

The heading-style parameter can be fed optional CSS values. Without quotation marks " " but with the ending semicolons ;. For example:

heading-style = color: red; font-size: 150%;

The link box[]

Below the big doc box is a small link box that shows some meta-data about the Dokumentation. The link box shows different things depending on what parameters are fed to this Vorlage, and in which namespace it is used. In some cases the link box is not shown at all.

To hide the link box, add the parameter |link box=off.

You can also insert customised text in the link box, by defining the |link box= parameter. For example: |link box=This Dokumentation is automatically generated by [[Vorlage:Country showdata]]

Automatic functions[]

If the Dokumentation page does not exist, the [create] link includes a preload page so that clicking it will pre-fill the edit form with the basic Dokumentation page format. Preload text is also used for the /sandbox and /testcases (create) links.

When this Vorlage is on a protected Vorlage page it now automatically adds {{pp-Vorlage}} which shows the grey or red padlock in the top right corner. So no need to manually add {{pp-Vorlage}} to Vorlagen that use {{Dokumentation}}.

When this Vorlage is on a /sandbox Unterseite it automatically adds the {{Vorlage sandbox notice}}. If that sandbox is not a Unterseite of the live Vorlage, then the |livepage= parameter can be used to correctly link back to that Vorlage.

Subject namespaces vs. talk namespaces[]

Terminology: Subject namespaces are the opposite of talk namespaces. For instance "Vorlage:" is the subject space of "Vorlage talk:".

This Vorlage is usually placed in a subject namespace, within <noinclude> tags. But in some cases this Vorlage needs to be on the talk page:

  • For preload pages (usually in Vorlage or Wikipedia namespaces), since they cannot use <noinclude>. See for instance, Vorlage talk:AfC preload and Vorlage talk:RfD Unterseite starter. Such talk pages can be marked with {{talkdoc}}.
  • In the Mediawiki namespace, since <noinclude> often does not work in system messagesm and since the Mediawiki namespace needs to be kept clean for performance reasons.

When placed on talk pages, this Vorlage usually is placed near the top of the page and without <noinclude>...</noinclude> tags.

The /doc, /sandbox and /testcases pages should normally be in the subject namespace, except in the namespaces that do not have the MediaWiki Unterseite feature enabled: Main, File, Mediawiki and Kategorie. (But currently we only show the /sandbox and /testcases links from User, User talk, Vorlage and Vorlage talk namespaces.) There are also a whole bunch of other technical reasons why the /doc page must be stored under the talk page for those (but only those) namespaces.

This Vorlage automatically points its [create] links for the /doc, /sandbox and /testcases to the right namespace.

Technische Details[]

This Vorlage calls {{Dokumentation/start box2}} and {{Dokumentation/end box2}} which in turn call {{Dokumentation/start box}} and {{Dokumentation/end box}}. The /start box (and /end box) hold most of the code, while this Vorlage and /start box2 (and /end box2) do parameter preprocessing.

The preload page for the /doc [create] link is Vorlage:Dokumentation/preload, but in File namespace it is Vorlage:Dokumentation/preload-filespace. The preload pages for the /sandbox and /testcases [create] links are Vorlage:Dokumentation/preload-sandbox and Vorlage:Dokumentation/preload-testcases.

For more technical details see the talk page.

Siehe auch[]

  • {{Dokumentation}} – Placed on Vorlagen and other pages to document them.
  • {{Dokumentation Unterseite}} – Used at the top of /doc Unterseites to explain what they are and to link back to the page they document.
  • {{barnstar Dokumentation}} – Variant specifically for barnstar Vorlagen
  • Wikipedia:Vorlage Dokumentation – The how-to guide about Vorlage Dokumentation.
  • Wikipedia:Vorlage test cases – How to use /sandbox and /testcases Unterseites and more about Vorlage testing.


Advertisement