ヘルプ:テンプレート

提供: Minecraft Wiki
移動先: 案内検索
Book and Quill.png
この記事の内容は翻訳されていません。
あなたが内容を翻訳してみませんか?

テンプレートを使用すれば、ソース全てを記述せずともWiki全体で簡単にオブジェクトを表示できます。テンプレートに加えられた変更は、それを使用している全てのページに反映されます。

使用法[ソースを編集]

To use a template, use {{Template name}}. This will put the contents of Template:Template name in place of it when the page is loaded.

Templates with parameters[ソースを編集]

Some templates use parameters, which contain extra information. For example, {{msgbox}} produces:


It doesn't work very well, but {{msgbox|title=Title|text=Text}} produces:

Title
Text


A full list of parameters should be found on the templates' pages.

Templates with optional parameters[ソースを編集]

Some templates, such as Template:Delete, have optional parameters. {{Delete}} produces:

This page has been tagged for and is currently pending deletion per user request 議論
This is due to a violation of the rules or by the author's request.


It looks fine. If you want to add a reason, {{Delete|Reason for deletion}} produces:

This page has been tagged for and is currently pending deletion per user request 議論
This is due to a violation of the rules or by the author's request.
Reason: Reason for deletion

Transcluding other pages[ソースを編集]

You can transclude any page in the wiki. If the page is in the (Main) namespace, make sure to add a colon (:) before the name of the page.

<noinclude> tags[ソースを編集]

If <noinclude> tags are used in the template, nothing inside them is transcluded.