• Home
  • Random
  • Nearby
  • Log in
  • Settings
  • Donate
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:1x/sandbox

  • Template
  • Talk
  • Language
  • Watch
  • Edit
< Template:1x
This is the template sandbox page for Template:1x (diff).
Template documentation[view] [edit] [history] [purge]
WarningThis template is used on 37,000+ pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.

Usage

edit

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

edit
  • {{P1}}, a functionally equivalent template
  • {{1x}}
  • {{2x}}
  • {{3x}}
  • {{4x}}
  • {{5x}}
  • {{Loop}} (for arbitrary numbers of repetitions)
The above documentation is transcluded from Template:1x/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wiki.x.io/w/index.php?title=Template:1x/sandbox&oldid=717158959"
Last edited on 26 April 2016, at 02:22

Languages

      This page is not available in other languages.

      Wikipedia
      • This page was last edited on 26 April 2016, at 02:22 (UTC).
      • Content is available under CC BY-SA 4.0 unless otherwise noted.
      • Privacy policy
      • About Wikipedia
      • Disclaimers
      • Contact Wikipedia
      • Code of Conduct
      • Developers
      • Statistics
      • Cookie statement
      • Terms of Use
      • Desktop