Help page: Edit

Editing Help:Transclusion

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.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 80: Line 80:
 
===Composite pages===
 
===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! -->  
 
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:
 +
* [[BattleTechWiki:Village pump]]: mostly consists of the transcluded page [[Template:Village pump]].
 +
* A daily page like [[BattleTechWiki:Articles for deletion/Log/2005 May 31]], where each component page consists of the discussion on the deletion of one BattleTechWiki page, e.g., [[BattleTechWiki: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.
 
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.
Line 86: Line 93:
  
 
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.
 
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 [[BattleTechWiki talk:Template namespace/Archive 1#transcluding prose]].
  
 
===Pages with a common section===
 
===Pages with a common section===
Line 92: Line 103:
  
 
This can be very useful when two [[BTW:DAB|disambiguation]] pages share content, or a list page and a disambiguation page share content (see third example below).
 
This can be very useful when two [[BTW:DAB|disambiguation]] pages share content, 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 <code><nowiki>{{Help:Editing sections of included templates}}</nowiki></code>. 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===
 
===Repetition within a page===
On pages where there is a lot of repetitive information&nbsp;— various kinds of lists, usually&nbsp;— it is sometimes useful to make a template that contains the repeating text, and then call that template multiple times.
+
On pages where there is a lot of repetitive information&nbsp;— various kinds of lists, usually&nbsp;— 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 <code><nowiki>{{3x| howdy!}}</nowiki></code> 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 [[BattleTechWiki: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
 +
-->
  
 
==Partial transclusion==
 
==Partial transclusion==

Please note that all contributions to BattleTechWiki are considered to be released under the GNU FDL 1.2 (see BattleTechWiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, 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. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)

Advanced templates:

Editing: {{Merge}}   {{Moratorium}}   {{Otheruses| | | }}

Notices: {{NoEdit}}   {{Sign}}   {{Unsigned|name}}   {{Welcome}}

Administration: {{Essay}}   {{Policy}}   {{Procedure}}

Templates used on this page:

This page is a member of 2 hidden categories: