• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:Codes

  • Template
  • Talk
  • Language
  • Watch
  • Edit

Template documentation[view] [edit] [history] [purge]
This template uses Lua:
  • Module:Separated entries (sandbox)
See also: Template:Samp

This template is a simplified usage of <code>...</code>.

Each anonymous parameter is a string to format. Note that &lt;nowiki>...</nowiki>; is needed around a parameter value if it contains the pipe (|) or equals (=) symbols, or they will be treated as a parameter separator or parameter identifier, respectively. Alternatively, you could also use &lt;nowiki>|</nowiki> or {{=}} instead.

Use the {{{delimiter}}} parameter (aliases {{{delim}}} or {{{d}}}) to change the separator between each string. Set this value to the name in words of the delimiter, such as "and".

Examples

edit
  1. {{codes|text}} – text
  2. {{codes|1|2|3|4|5}} – 1,2,3,4and5
  3. {{codes|1|2|3|4|5|delimiter=,}} – 1,2,3,4,5
  4. {{codes|1|2|3|4|5|delimiter=and}} – 1,2,3,4and5
  5. {{codes|<nowiki>something=one|two|three</nowiki>}} – something=one|two|three
  6. {{codes|something{{=}}one{{!}}two{{!}}three}} – something=one|two|three
The above documentation is transcluded from Template:Codes/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Codes&oldid=1018069205"
Last edited on 16 April 2021, at 03:31

Languages

    • Беларуская (тарашкевіца)
    • සිංහල
    Wikipedia
    • Wikimedia Foundation
    • Powered by MediaWiki
    • This page was last edited on 16 April 2021, at 03:31 (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