Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Help:Transclusion
(section)
Help page
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
View history
General
What links here
Related changes
Special pages
Page information
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!
==Applications of transclusion== The most common application of transclusion is in the use of [[Help:Template|templates]]. However, other pages are also sometimes transcluded, mainly within project space. ===Composite pages=== Composite pages consist, wholly or partly, of transcluded component pages. The wikitext of such a page may, partly or fully, consist of tags, for the inclusion of component pages. The component pages are usually not in the template namespace, and are often full pages in their own right. Composite pages are intended to gather them into a central location.<!-- "usually not" is too vague; explain the exceptions that prove the rule! --> Examples of composite pages: * [[Wikipedia:Village pump]]: mostly consists of the transcluded page [[Template:Village pump]]. * A daily page like [[Wikipedia:Articles for deletion/Log/2005 May 31]], where each component page consists of the discussion on the deletion of one Wikipedia page, e.g., [[Wikipedia:Articles for deletion/Sp3tt]]. For this day, 75 component pages made up the composite page. * [[m:Meta:Translation/Coordination]], mainly containing ** [[m:Meta:Translation/Coordination/List/Meta]] ** [[m:Meta:Translation/Coordination/List/Main]] This allows the choice between viewing the component pages separately or together. Viewing a composite page is convenient when there are many small, related component pages, in that it allows an overview of all the components without the effort of following numerous links. In general, each component page and the composite page are treated separately. While the actual changes on the component pages will be transcluded onto the composite page, the edit history, recent changes, page-watch settings, page protection, TOC, "what links here" links, and other features of the composite page do not reflect, or affect, the histories, watch settings, protection levels, ''what links here'' lists of the component pages. The composite page is a page in its own right. The talk page of a composite page is used to talk about the composition and the page in general, not the component pages; although it in turn could be a composite of the talk pages of the component pages. Editing a section of a component page can be done directly from the composite page, see [[Help:Section#Editing sections of included templates|editing sections of included templates]]. After saving, one ends up editing the component page to which the section belongs. On projects with the [[Help:Interwiki linking#Interlanguage links|interlanguage link feature]], the composite page shows the combined interlanguage links of all component pages, hence possibly multiple links for one language or even for one page. See also [[Wikipedia talk:Template namespace/Archive 1#transcluding prose]]. ===Pages with a common section=== {{shortcut|WP:COMMONSECTION}} When two pages need to discuss the same material in the same way, they can share a section. For example, a section of an existing page may be transcluded on other pages. This may also involve creating a third page and transcluding that page onto both pages. This third page may be a page in its own right or a subpage of either of the other two β except in article space, where subpages are not allowed (see [[wikipedia:WP:SUB]]). The third page may be placed in the same namespace as the other pages or in template namespace β again, except for use in article space, where templates should not store article text (see [[wikipedia:WP:TG]]). Common sections like this should be marked with an explanatory header, and/or given a special layout, to inform the reader that this section of the page is in a different location, since transcluding shared article sections can easily confuse novice editors and readers alike if left unmarked. This can be very useful when two [[wikipedia:WP:DAB|disambiguation]] pages share content,{{Disputed inline|talk=Wikipedia talk:Manual of Style/Disambiguation pages#Transclusion|date=September 2017}} or a list page and a disambiguation page share content (see third example below). Examples: *The [[Help:Editing sections of included templates]] article is included in [[Help:Section]] with the markup <syntaxhighlight lang="wikitext" inline>{{Help:Editing sections of included templates}}</syntaxhighlight>. By including a heading in the included article, a user clicking the "Edit" link on that heading in [[Help:Section]] is automatically directed to edit [[Help:Editing sections of included templates]]. *{{pim|Help|Alphabetic order}} * [[Joseph Gordon-Levitt]] transcludes the introduction of [[HitRecord]] into a summary section of the same name, rather than maintaining two copies of the identical text. ===Repetition within a page=== On pages where there is a lot of repetitive information β various kinds of lists, usually β it is sometimes useful to make a template that contains the repeating text, and then call that template multiple times. For example, [[Template:EH listed building row]] is used repeatedly to construct tables in many articles. Simple repetition of the same text can be handled with repetition of a parameter in a single template: e.g., {{tl|3x}}, where <syntaxhighlight lang="wikitext" inline>{{3x| howdy!}}</syntaxhighlight> produces <code>{{3x| howdy!}}</code>. For more information on repetition, see also [[m:Help:Recursive conversion of wikitext]]. For more information on the current template system, see [[Wikipedia:Template namespace]]. <!-- saving a nice programming tutorial on template language 'til someone merges it somehwere Cpiral moved it to [[wp:template namespace#Sandbox_for_experiments]], 9/12/2012 -->
Summary:
Please note that all contributions to Red Letter Media Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
RLMWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Toggle limited content width