Module:Wikitable/doc

MyWikiBiz, Author Your Legacy — Thursday November 21, 2024
Jump to navigationJump to search

This is the documentation page for Module:Wikitable

Template:Module rating

Usage

This Template:Pagetype is designed to make passing tables to templates less of a hassle. It implements {{wikitable}}

Oftentimes, adding wikitable markup to a template or other parser tag generates gibberish when one fails to escape every | and =. Moreover, escaping pipe characters with Template:T everywhere can make for some rather ugly-looking markup.

With this module, most wikitables can be embedded into templates without escaping any pipe characters. Also, = for Template:Tag element attributes do not need to be escaped, however, for individual rows and cells, such is still necessary. Finally, there must be at least one pipe character before the first header cell (only an issue if |- is omitted before the first row)

See Differences:

original (copied from: 2016 Summer Olympics):
2016 Summer Olympics bidding results[1]
City NOC Round 1 Round 2 Round 3
Rio de Janeiro Template:BRA 26 46 66
Madrid Template:ESP 28 29 32
Tokyo Template:JPN 22 20
Chicago Template:USA 18

code: <syntaxhighlight lang="moin" highlight="1">

2016 Summer Olympics bidding results[2]
City NOC Round 1 Round 2 Round 3
Rio de Janeiro Template:BRA 26 46 66
Madrid Template:ESP 28 29 32
Tokyo Template:JPN 22 20
Chicago Template:USA 18

</syntaxhighlight>

module:

Module talk:Wikitable/example

code (with changes highlighted):
[[:Module talk:Wikitable/example]]

Sources cited in example

  1. ^ <templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>"Past Bid Results". GamesBids.com. Archived from the original on 17 March 2011. Retrieved 31 October 2015.
  2. ^ <templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>"Past Bid Results". GamesBids.com. Archived from the original on 17 March 2011. Retrieved 31 October 2015.

See also