Movatterモバイル変換


[0]ホーム

URL:


Jump to content
MediaWiki
Search

Help:Transclusion

From mediawiki.org
Translate this page
Languages:
PDNote: When you edit this page, you agree to release your contribution under theCC0. SeePublic Domain Help Pages for more info.PD

Transclusion is a general MediaWiki term for including things into a page using double-brace "{{}}" markup.This includestemplates, pages in other namespaces,magic words, output ofparser functions, someSpecial pages,interwiki pages, and more.

Target page syntax

[edit]

Basic use

[edit]

To transclude a page, include both the namespace and the page name (separated with a colon) within the double-brace:

{{Help:Transclusion}}

When transcluding atemplate, you may omit the namespace and colon (this transcludes a template stored at Template:Infobox):

{{infobox}}

When transcluding an article in theMain namespace, you must use a colon before the article title (this transcludes the article having the title Transclusion):

{{:Transclusion}}

When transcluding asubpage of the target page, you may use the subpage name by itself (this is often done to display template documentation on the page for the template itself):

{{/doc}}

Parameters

[edit]

Transcluded templates andSpecial pages may accept parameters:

{{note|inline|This is a note.}}

Source page syntax

[edit]

Three tags (‎<noinclude>,‎<includeonly>, and‎<onlyinclude>) control which content appears in the target page.

‎<noinclude>
Content within the‎<noinclude>...‎</noinclude> tags is excluded from transclusion on the target page. This content still appears on the source page.
Source page wikitextWhat appears on the source pageWhat appears on the target page
Hello<noinclude>world</noinclude>Hello worldHello
‎<includeonly>
Content within the‎<includeonly>...‎</includeonly> tags is transcluded on the target page, but does not appear on the source page.Other content is also transcluded.
Source page wikitextWhat appears on the source pageWhat appears on the target page
Hello<includeonly>world</includeonly>HelloHello world
‎<onlyinclude>
Content within the‎<onlyinclude>...‎</onlyinclude> tags is transcluded on the target page, and also appears on the source page.Other content is not transcluded.
Source page wikitextWhat appears on the source pageWhat appears on the target page
Hello<onlyinclude>world</onlyinclude>Hello worldworld

See also

[edit]
Retrieved from "https://www.mediawiki.org/w/index.php?title=Help:Transclusion&oldid=8124062"
Category:

[8]ページ先頭

©2009-2026 Movatter.jp