Template:1x/doc
| icon | This is a documentation subpage for Template:1x. It may contain usage information, categories and other content that is not part of the original template page. |
__EXPECTED_UNCONNECTED_PAGE__
| This template is used on 6,900+ 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. |
This template echoes its first argument through the rendering engine.
Usage
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 ba{{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)