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!
==Usage <span class="anchor" id="Applications of transclusion"></span><span class="anchor" id="Usage"></span>== Transclusion is commonly used in [[Wikipedia:Templates|templates]], allowing content to be embedded dynamically across multiple pages. However, it is also applied in other contexts, particularly within project space, where it facilitates the management of structured content. ===Composite pages=== {{Hatnote|See also a 2005 Village Pump discussion on [[Wikipedia talk:Template namespace/Archive 1#transcluding prose|transcluding article prose as an unusual issue not covered by policy]].}} ''Composite pages'' are created by transcluding multiple component pages, either entirely or in part, into a central page. The wikitext of a composite page may include [[Help:HTML in wikitext|HTML tags]] to embed content, typically from standalone pages that are not part of the template namespace. The primary purpose of composite pages is to consolidate related content for easier access. ==== Examples ==== * [[Wikipedia:Village Pump]] β mostly consists of the transcluded page {{Xtn|[[Template:Village pump]]}}. * [[Wikipedia:Articles for deletion/Log]] β for example, [[Wikipedia:Articles for deletion/Log/2005 May 31]] aggregates discussions from multiple individual deletion pages, such as [[Wikipedia:Articles for deletion/Sp3tt]]. On this particular day, 75 component pages were included. * [[m:Meta:Translation_requests|Meta:Translation requests]] β pages such as [[m:Meta:Translation/Coordination/List/Meta]] and [[m:Meta:Translation/Coordination/List/Main]] are transcluded within [[m:Meta:Translation/Coordination]]. The use of composite pages allows users to view multiple related pages in one location rather than navigating through individual links. ==== Characteristics ==== Composite pages function independently from their component pages in several ways. While changes made to a component page are reflected on the composite page, the composite page maintains its own edit history, recent changes log, page-watch settings, and protection levels, separate from those of its transcluded content. The talk page of a composite page is used specifically for discussions about the composite itself rather than for the individual component pages it includes. However, in some cases, a composite talk page may also transclude discussions from its component pages, allowing for a [[Wikipedia:Centralized discussion|centralized discussion]] space. When editing, users can modify sections of a component page directly from the composite page, see {{Section link|Help:Section#Editing sections of included templates|}}. Once changes are saved, they are applied to the original component page, ensuring consistency across all instances where the content appears. For projects that support [[Wikipedia:Interlanguage links|interlanguage links]], a composite page aggregates all interlanguage links from its component pages. This can sometimes lead to multiple links pointing to the same language or page, reflecting the structure of the transcluded content. ===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 to other pages. This may also involve creating a third page and transcluding that page onto both pages. This third page may be a standalone page in its own right for another purpose, or a subpage of either of the other two β except in the mainspace, where [[Wikipedia:Subpages|subpages are not allowed]]. The third page may be placed in the same namespace as the other pages or in template namespace β again, except for use in mainspace, where templates should not be used to store [[Wikipedia:What is an article?|article text]], as this makes it more difficult to edit the content (see [[WP:TG]]). Common sections like this should be marked with an explanatory header, such as using the templates {{Tl|Transcluding article}} or {{Tl|Transcluded section}} to create [[Wikipedia:Hatnote|hatnotes]] above the transcluded content, 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. All templates can be found at [[:Category:Transclude page content templates]]. This can be very useful when two [[WP:DAB|disambiguation]] pages share content,{{Disputed inline|talk=Wikipedia talk:Manual of Style/Disambiguation pages#Transclusion|date=September 2017}} or a [[Wikipedia:List|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 -->
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)