| advertise add site services publishers database health videos | ![]() | about toolbar stats live show health store more stuff JOIN/LOGIN |
Trans fats | What are trans fats | Trans fat effects natural-health-informatio... | 2,4-hexadienal (89% trans,trans-, 11% cis,trans-): Carcinogenic Potency... potency.berkeley.edu | TRANS TIME Cryonics: Legal and Financial Arrangements for TRANS TIME Donor... transtime.com | Keeping Wikipedia Spick and Span fightaging.org |
"WP:TRANS" redirects here. You may be looking for Wikipedia:Transwiki log, Help:Transwiki, Wikipedia:Translation or Wikipedia:WikiProject Transwiki. Transclusion is the inclusion of the content of a document into another document by reference. In the Wikipedian context, it is the use of the template functionality of MediaWiki to include the same content in multiple documents without having to edit those documents separately. Template transclusion is the common way to use template messages, and is implemented by using a template tag, with this form:
Occasionally one may want to use a template, but for one reason or another may not want to use transclusion. The automatic one-time copying of a template's code/text to the location of a template tag is called Template substitution or subclusion (substitution + transclusion). To subclude a template's code/text, the template tag is modified from the standard transclusion tag to a substitution tag, simply by adding
[edit] How transclusion worksTo transclude any source page (within a single MediaWiki project, such as en:Wikipedia), include the following code in the target page:
Whenever the target page A with this code is rendered, the engine will include in that place not the code itself, but the entire content of the source page B, SOMEPAGE. For example, you might decide to place a welcome message on every newcomer's Talk Page. Transclusion creates a "live" link between the template-page and the target-page(s) upon which the message should appear. When the template is edited, all the target-pages are edited too. For example, you create a (template) page in Wikipedia with your home mailing address and then include that template not only on your page, but all your friends' pages, too. Later, after moving to a new house, you then update your address template and the new address will automatically appear on all your friends' pages. [edit] EtymologyTed Nelson coined the term "transclusion," as well as "hypertext" and "hypermedia", in his 1982 book, Literary Machines. [edit] Partial transclusionBy using "noinclude", "onlyinclude" and "includeonly" markup, it is possible to transclude part of a page rather than all of it. Such partial transclusions can also be achieved by transcluding from other pages such as subpages. It is often useful not to transclude some information, such as template documentation. For an example of how this technique can be applied to simplify the creation of summary articles, see Pathology, which consists of a collection of transcluded lead paragraphs from several main articles. [edit] Transclusion markupSee also: Help:Template#Noinclude, includeonly, and onlyinclude and Help:Category#Categories_and_templates There are three pairs of tags that can be used in wikitext to control how transclusion affects elements of a template or article. They determine whether or not wikitext renders, either in it's own article, which we will call "here", or in another article where it is transcluded, which we will call "there".
There can be several such section elements. Also, they can be nested. All possible renderings are achievable. For example, to render there one or more sections of the page here use <onlyinclude> tags. To append text there, wrap the addition in <includeonly> tags above, within, or below the section. To omit portions of the section, nest <noinclude> tags within it. For an example refer to: the wikitext of the the wiki news thread. [edit] SubpagesOne can cut and paste the text to be transcluded into a subpage, then use the name of the subpage in the transclusion template. This approach can only be used with subpages from User, Talk or Wikipedia pages; currently, subpages cannot be created from main article pages. Example: you want to discuss the deletion and redirecting of Pussycat to Cat. First, create the subpage Talk:Pussycat/Let's delete Pussycat!, write your comment into it, then transclude it in Talk:Pussycat and Talk:Cat using the template {{Talk:Pussycat/Let's delete Pussycat!}}. Comments posted in either talk pages will be shown in both. [edit] Special pagesSee also: Wikipedia:Special pages#Miscellaneous Some pages on Special:Specialpages can be transcluded, such as Special:Allpages, Special:Prefixindex, Special:Newfiles, Special:Newpages, Special:Recentchanges and Special:Recentchangeslinked. Samples:
Except for Special:Recentchangeslinked, the slash and the word/number after the slash can be omitted, giving a list of pages without a specific starting point, or a list of the default length. [edit]
[edit] Templates[edit] See also
|
| ↑ top of page ↑ | about thumbshots |