Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Help:Transclusion
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Examples === {| class="table" style="padding:0.25em; margin-bottom:0.5em; border: 1px #dadde3 solid; background-color: #F5FAFF;" | style="vertical-align:top;" | {{nowrap|[[File:Dialog-information.svg|20px|alt=blue lightbulb]] '''Outline''':}} || using <syntaxhighlight lang="wikitext" inline>{{Pagename}}</syntaxhighlight> or <syntaxhighlight lang="wikitext" inline>{{Template:Pagename}}</syntaxhighlight> will transclude the content of {{Xtn|{{fake link|Template:Pagename}}}}. Using <syntaxhighlight lang="wikitext" inline>{{:Pagename}}</syntaxhighlight> instead will transclude the mainspace article titled {{Xtn|{{fake link|Pagename}}}}. Including <syntaxhighlight lang="wikitext" inline>{{Namespace:Pagename}}</syntaxhighlight> transcludes a page in the defined namespace, such as {{Xtn|{{fake link|Help:Pagename}}}}. |} * '''Specifying namespace''': <syntaxhighlight lang="wikitext" inline>{{Namespace:Pagename}}</syntaxhighlight> will transclude the page titled <syntaxhighlight lang="wikitext" inline>Namespace:Pagename</syntaxhighlight>. For example, if a page has the wikitext <syntaxhighlight lang="wikitext" inline>{{Wikipedia:Notability}}</syntaxhighlight> in it, it will transclude the page {{Xtn|[[Wikipedia:Notability]]}} into it. Please note that <syntaxhighlight lang="wikitext" inline>{{WP:Notability}}</syntaxhighlight> would do exactly the same thing, as <code>WP:</code> is a [[Wikipedia:Namespace#Aliases|namespace alias]], which is [[Wikipedia:Shortcut#Namespace_aliases|automatically translated]] by the Wikipedia servers to <code>Wikipedia:</code>. * '''Calling from the Article namespace''': If the namespace is omitted, but the colon is included, like <syntaxhighlight lang="wikitext" inline>{{:Pagename}}</syntaxhighlight>, the mainspace article <code>Pagename</code> will be transcluded. For example, <syntaxhighlight lang="wikitext" inline>{{:Notability}}</syntaxhighlight> will transclude the article [[Notability|{{Xtn|[[Notability]]}}]]. * '''Template namespace''': If both namespace and colon are omitted, like <syntaxhighlight lang="wikitext" inline>{{Pagename}}</syntaxhighlight>, the <code>Template:Pagename</code> will be transcluded. For example <syntaxhighlight lang="wikitext" inline>{{Notability}}</syntaxhighlight>, and also <syntaxhighlight lang="wikitext" inline>{{Template:Notability}}</syntaxhighlight>, will both transclude the [[Template:Notability|{{Xtn|[[Template:Notability]]}}]]. Additionally, specific {{Section link|Help:Transclusion|Template parameters|nopage=y}} and {{Section link|Help:Transclusion|Transclusion modifiers|nopage=y}} allow [[Parameter (computer programming)|parameters]] to be passed to templates, alter how transclusion occurs, and therefore the output customized. This is explained in more detail below.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)