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 99: Line 99:
 
{{shortcut|BTW:PARTRANS}}
 
{{shortcut|BTW:PARTRANS}}
 
By using {{tag|noinclude|o}}, {{tag|includeonly|o}} and {{tag|onlyinclude|o}} markup, it is possible to transclude ''part'' of a page, rather than all of it. Such partial transclusions can be achieved by transcluding from any pages, including subpages. It is often useful to exclude part of a page in a transclusion, an example being with template documentation.  
 
By using {{tag|noinclude|o}}, {{tag|includeonly|o}} and {{tag|onlyinclude|o}} markup, it is possible to transclude ''part'' of a page, rather than all of it. Such partial transclusions can be achieved by transcluding from any pages, including subpages. It is often useful to exclude part of a page in a transclusion, an example being with template documentation.  
 +
 +
For an example of how this technique can be applied to simplify the creation of [[BattleTechWiki:Summary style|summary articles]], see how part of the [[History of pathology]] (see the diff [http://en.wikipedia.org/w/index.php?title=History_of_pathology&diff=prev&oldid=207668817 here]) was transcluded into [[Pathology]] (see the diff [http://en.wikipedia.org/w/index.php?title=Pathology&diff=prev&oldid=207669487 here]) using the <code><nowiki>{{:History of pathology}}</nowiki></code> markup. The Pathology article at that time (see [https://en.wikipedia.org/w/index.php?title=Pathology&oldid=207669487 here]) mainly consisted of transcluded [[BattleTechWiki:Manual of Style/Lead section|lead paragraphs]] and other sections from a number of articles. Look at the source to see how this was done. Since then, the Pathology article has been rewritten, and does not include all these transclusions.
 +
 +
Another example can be found in the transclusion of part of [[HitRecord]] (introductory paragraph only) into a same-named summary section in [[Joseph Gordon-Levitt#HitRecord|Joseph Gordon-Levitt]].
  
 
{{anchor|Transclusion markup}} <!--Temp anchor  
 
{{anchor|Transclusion markup}} <!--Temp anchor  
Line 108: Line 112:
 
In transclusion, a source page is transcluded into a destination page. But with partial transclusion, only part of that source page will be transcluded into a destination page. But in addition, what is transcluded to a destination page does not have to be visible on the source page.
 
In transclusion, a source page is transcluded into a destination page. But with partial transclusion, only part of that source page will be transcluded into a destination page. But in addition, what is transcluded to a destination page does not have to be visible on the source page.
  
''Page rendering'' of a source page can be defined as the rendering of that source page when it is saved, which will be the same as the preview.  We can call this rendering '''''here'''''.
+
''Page rendering'' of a source page can be defined as the rendering of that source page when it is saved, which will be the same as the [[BTW:preview|preview]].  We can call this rendering '''''here'''''.
  
 
''Transclusion rendering'' of a source page can be defined as the rendering of a destination page that has a source page transcluded into it; but only that part of the destination page that was transcluded from the source page. The preview of the transclusion rendering will again be identical. We can call this rendering '''''there'''''.
 
''Transclusion rendering'' of a source page can be defined as the rendering of a destination page that has a source page transcluded into it; but only that part of the destination page that was transcluded from the source page. The preview of the transclusion rendering will again be identical. We can call this rendering '''''there'''''.

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: