Difference between revisions of "Template:Includeonly/doc"

From blackwiki
Jump to navigation Jump to search
imported>Hyacinth
imported>BoldLuis
 
(5 intermediate revisions by 3 users not shown)
Line 7: Line 7:
 
== Usage ==
 
== Usage ==
  
  <nowiki>{{&lt;includeonly&gt;subst:&lt;/includeonly&gt;</nowiki>{{TEMPLATENAME}}&#124;'''<nowiki>{{{1}}}</nowiki>'''}}</nowiki>
+
  <nowiki>{{&lt;includeonly&gt;subst:&lt;/includeonly&gt;</nowiki>{{TEMPLATENAME}}&#124;'''<nowiki>{{{1}}}</nowiki>'''}}
  
 
If the template call is already within an includeonly block, the includeonly tags should be omitted.  Substitution is required, but must only be used during inclusion; otherwise, the template will be substituted with includeonly tags immediately, and the desired effect will be lost.
 
If the template call is already within an includeonly block, the includeonly tags should be omitted.  Substitution is required, but must only be used during inclusion; otherwise, the template will be substituted with includeonly tags immediately, and the desired effect will be lost.
  
 
== See also ==
 
== See also ==
 
+
*{{tl|noinclude}}
 +
*{{tl|onlyinclude}}
 +
*[[Help:Template#Noinclude, includeonly, and onlyinclude]]
 +
*[[WP:Transclusion#Selective transclusion]]
 
{{User:Zenexer/Templates/Metatemplate doc|links}}
 
{{User:Zenexer/Templates/Metatemplate doc|links}}
  

Latest revision as of 10:42, 3 May 2020

Used to insert a <includeonly/> tag in a substituted template. The resulting tag will be processed as a real tag by further substitutions and transclusions, so this should not be used for documentation. Rather, it is used by metatemplates to generate includeonly tags.

Usage

{{<includeonly>subst:</includeonly>Includeonly|{{{1}}}}}

If the template call is already within an includeonly block, the includeonly tags should be omitted. Substitution is required, but must only be used during inclusion; otherwise, the template will be substituted with includeonly tags immediately, and the desired effect will be lost.

See also

User:Zenexer/Templates/Metatemplate doc