Difference between revisions of "Template:Documentation/doc"

From Deep Blue Robotics Wiki
Jump to: navigation, search
(Explanation: correction of definition: parse -> transclude)
(Explanation: not really "hidden" but discarded)
Line 14: Line 14:
  
 
==Explanation==
 
==Explanation==
Transcluding a template B on a page A adds to the {{peis}} of page A, which is the amount of text the server must transclude to render the page. Content of template B that is hidden on page A, like documentation, adds to this include size of page A even though it doesn't appear on the page. Transcluding the documentation from a subpage C reduces this include size to the negligible number of bytes added by the characters on the template page itself, thus reducing server load.
+
Transcluding a template B on a page A adds to the {{peis}} of page A, which is the amount of text the server must process for transclusion to render the page. Content of template B that is discarded during this process due to noinclude tags, like documentation, adds to this include size of page A even though it doesn't appear on the page. Transcluding the documentation from a subpage C reduces this include size to the negligible number of bytes added by the characters on the template page itself, thus reducing server load.
  
 
Using a subpage also allows anyone to edit the documentation, categories, or interwiki links of a protected template.
 
Using a subpage also allows anyone to edit the documentation, categories, or interwiki links of a protected template.

Revision as of 06:50, 5 July 2007

Template:Documentation subpage Template:Shortcut

Usage

On template (or other) pages

This template displays a "(Namespace) documentation" box like the one you are seeing now. Place the following code on the template (or other) page, and edit the documentation page (click the "[edit]" link after you save) where you can put instructions, categories, et cetera.

<noinclude>{{documentation}}</noinclude>

On documentation subpages

Please add the following code at the top of the subpage to put it in Category:Documentation subpages; this keeps it out of Special:Uncategorizedpages and links back to the main page.

<noinclude>{{documentation subpage}}</noinclude>

Typically documentation subpages are not also put in the categories in which the page the documentation refers to is put.

Explanation

Transcluding a template B on a page A adds to the Template:Peis of page A, which is the amount of text the server must process for transclusion to render the page. Content of template B that is discarded during this process due to noinclude tags, like documentation, adds to this include size of page A even though it doesn't appear on the page. Transcluding the documentation from a subpage C reduces this include size to the negligible number of bytes added by the characters on the template page itself, thus reducing server load.

Using a subpage also allows anyone to edit the documentation, categories, or interwiki links of a protected template.


See also