Toggle menu
15
236
70
27.5K
Kenshi Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
Created page with "<!-- Please add categories at the bottom of this page, and interwikis at Wikidata (see Wikipedia:Wikidata) --> == Usage == Echo the first argument to the template through the rendering engine. This is occasionally useful as a metatemplate. For example: * To break up certain constructs that otherwise have special meaning in wikitext. ** <syntaxhighlight lang="wikitext" inline>{{1x|~~}}{{1x|~~}}</syntaxhighlight> → {{1x|~~}}{{1x|~~}} * To strip white space from a templ..."
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{Documentation subpage}}
<!-- Please add categories at the bottom of this page, and interwikis at Wikidata (see Wikipedia:Wikidata) -->
<!-- Please add categories at the bottom of this page, and interwikis at Wikidata (see Wikipedia:Wikidata) -->



Latest revision as of 05:49, 19 February 2025

Usage

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

This is occasionally useful as a metatemplate. For example:

  • To break up certain constructs that otherwise have special meaning in wikitext.
    • {{1x|~~}}{{1x|~~}} → ~~~~
  • To strip white space from a template parameter.
    • a{{{1| x }}}b → a x b
    • a{{1x|1= {{{1| x }}} }}b → axb
  • To conditionally hide or show some content by choosing which template takes a parameter.
    • {{ {{#if: {{{x}}} | 2x | 1x }} | hello }} → hello hello
    • {{ {{#if: {{{x}}} | void | 1x }} | hello }}

See also

  • {{P1}}, a functionally equivalent template
  • {{1x}}
  • {{2x}}
  • {{3x}}
  • {{4x}}
  • {{5x}}
  • {{Loop}} (for arbitrary numbers of repetitions)