コンテンツにスキップ

Wikivoyage:Using MediaWiki templates

提供:ウィキボヤージュ

The software we use, MediaWiki, has a feature to include the contents of one article into another automatically. This is called transclusion or templating, although it has nothing to do with our article skeleton templates. (The article templates pre-date the idea of templating in MediaWiki.)

See Help on Templates at Wikimedia.

See also en:Wikivoyage:Template index for a list of available templates.

Templates should be used for editorial markup and metadata. In general, a template should be discussed prior to being created or modified. In some cases templates can be confusing for new users, and having large numbers of templates that perform similar functions is counter-productive. Be aware that problems such as difficulty in transferring templates to other formats (such as print or PDF), attribution issues, and maintainability may all be considerations that could make a template a non-ideal solution.

New MediaWiki template proposals

[編集]

Before a new MediaWiki template is put into general use it needs to be discussed and accepted as good or preferably best practice. Until such acceptance, new templates will be tagged {{experimental}}, and should not be added to more than one low-visibility article—so not Paris. (If other editors object to that addition, though, expect it to be removed until a consensus is reached.) If new templates fail to gain community support, they will eventually be deleted.

MediaWiki templates have both advantages and disadvantages. Some situations lend themselves to MediaWiki templates; others do not. Each application should discuss the merits and disadvantages of using a MediaWiki template solution as opposed to other alternatives, if any.

If users wish to experiment with templates then they should explain what they are trying to do on the template talk page. That way we can all learn from the effort.

Usage documentation

[編集]

Each MediaWiki template that is intended for use by contributors should have its usage documented before it is put into widespread use. This should be done on the template talk page, as well as on a project page or help page that explains how, where and when to use the template. Those templates that are in general use should be listed here too, with links to the documentation.

Change control

[編集]

Changes to any MediaWiki template, especially popular ones, should be discussed and agreed to by users before it is implemented. A substantial change to a template might confuse or distress some users editing a page if the template text also changed at the same time as their edit was made. To safeguard against this, any proposed change to any popular template should have a change control plan that describes how the out-of-date-page or page refresh issues can be addressed.

See also

[編集]