Difference between revisions of "Template:1x/doc"

From blackwiki
Jump to navigation Jump to search
blackwiki>Enterprisey
m (Spelling)
m (16 revisions imported)
 
(12 intermediate revisions by 10 users not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<!-- Categories and interwikis go at the bottom of this page. -->
+
{{High-risk|173,000+}}
 +
<!-- Please add categories at the bottom of this page, and interwikis at Wikidata (see Wikipedia:Wikidata) -->
  
 
== Usage ==
 
== Usage ==
 
+
Echo the first argument to the template through the rendering engine.
{{user|Zenexer}}'s explanation:
+
* See how {{param|1}} behaves in a template.
 
+
* As a metatemplate, for example, <code><nowiki>{{1x|<}}includeonly{{1x|>}}</nowiki></code> generates an <code>&lt;includeonly&gt;</code> tag that will be evaluated when the resulting template is substituted, unlike such a tag made with XML/HTML entities (&amp;lt; and &amp;gt;).
:This template is particularly useful as a meta-metatemplate. A metatemplate can use, for example, <code><nowiki>{{1x|<}}includeonly{{1x|>}}</nowiki></code> to generate an <code>&lt;includeonly&gt;</code> tag. Unlike such a tag made with XML/HTML entities (&lt; and &gt;), this tag will be evaluated when the resulting template is substituted.
 
  
 
== See also ==
 
== See also ==
*[[Template:2x]]
+
* [[Template:2x]]
*[[Template:3x]]
+
* [[Template:3x]]
 
 
<includeonly>
 
<!-- Categories and interwikis go here: -->
 
[[Category:Wikipedia formatting and function templates]]
 
  
</includeonly>
+
<includeonly>{{sandbox other||
 +
<!-- Add categories below this line, and interwikis at Wikidata -->
 +
[[Category:Text-specific formatting and function templates]]
 +
[[Category:Wikipedia utility templates]]
 +
}}</includeonly>

Latest revision as of 07:42, 4 October 2020

Usage

Echo the first argument to the template through the rendering engine.

  • See how {{{1}}} behaves in a template.
  • As a metatemplate, for example, {{1x|<}}includeonly{{1x|>}} generates an <includeonly> tag that will be evaluated when the resulting template is substituted, unlike such a tag made with XML/HTML entities (&lt; and &gt;).

See also