Template:Columnlist: Difference between revisions

From MediaWiki
Jump to navigationJump to search
Derik (talk | contribs)
mNo edit summary
Abates (talk | contribs)
m Protected "Template:Columnlist" [edit=autoconfirmed:move=autoconfirmed]
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude><tt><pre><nowiki>{{Collumnlist|2|
<noinclude><tt><pre><nowiki>{{columnlist|2|
* Dasher
* Dasher
* Dancer
* Dancer
Line 10: Line 10:
}}</nowiki></pre></tt>
}}</nowiki></pre></tt>


[3a]
{{columnlist|2|
{{collumnlist|colwidth=10em|content=
* Dasher
* Dasher
* Dancer
* Dancer
Line 20: Line 19:
* Donner
* Donner
* Blitzen
* Blitzen
}}[3b]
}}
 
'''<tt><nowiki>{{columnlist}}</nowiki></tt>''' or '''<tt><nowiki>{{Collist}}</nowiki></tt>''' is used to make long lists display in a multi-column format.  If the first paremeter is a number, the list will display in that ''fixed number'' of variable-width columns.  (If the first parameter is not set, the list displays normally.)
 
An optional parameter '''<tt>colwidth=30em</tt>''' can be set to make the list display in a ''variable number'' of fixed-width columns.  ('''em''', '''px''', ex, in, cm, mm, pt, pc)


As of this writing<sup>({{#time: M-d-y| 12:29, 7 September 2007 (UTC) }})</sup>, this template does not work in Internet Explorer.  Slag 'em.<ref>'Not work' in this case means they see the same list without the pretty columns.  The page does not break, it merely looks better on real browsers.</ref>


</noinclude><includeonly>{{ #switch: {{{content|ʁ}}}
:''For similar multicolumn display of long reference/footnote sections see: [[Template: reflist]].
| ʁ = [a]{{ #if: {{#ifexpr: {{{1}}} }} | {{Collumnlist/Vomitorium | content={{{1|}}} }} | {{Collumnlist/Vomitorium | colqty={{{1}}} | content={{{2|}}} }} }}
 
  | [b]{{Collumnlist/Vomitorium|content={{{content|}}}|colqty={{{colqty|}}}|colwidth={{{colwidth|}}}}}
 
}}
<small>'''Technical note:''' This template references itself recursively, and a sub-template [[Template:Columnlist/Vomitorium]] as a balance of elegance and simplicity against wikiparser-induced profanity.<ref>Wikiparser is also invited to slag itself.</ref></small>
</includeonly>
 
==Footnotes==
<references/>
[[Category:Layout templates]]
</noinclude><includeonly>{{ #if: {{#ifexpr: {{{1}}} }}
| {{Columnlist/Vomitorium | content={{{1|}}} | colwidth={{{colwidth|}}} |size={{{size|£}}}}} <!--If {{{1}}} is *not* a number, send it to the Vomitorium as displayable content, and send the colwidth parameter, if it's set.-->
  | {{Columnlist/Vomitorium | colqty={{{1}}} | content={{{2|}}} |size={{{size|£}}}}} <!--If {{{1}}} is a number, make that the number of columns and send {{{2}}} as displayable content-->
}}</includeonly>

Latest revision as of 22:53, 26 July 2011

{{columnlist|2|
* Dasher
* Dancer
* Prancer
* Vixen
* Comet
* Cupid
* Donner
* Blitzen
}}
  • Dasher
  • Dancer
  • Prancer
  • Vixen
  • Comet
  • Cupid
  • Donner
  • Blitzen

{{columnlist}} or {{Collist}} is used to make long lists display in a multi-column format. If the first paremeter is a number, the list will display in that fixed number of variable-width columns. (If the first parameter is not set, the list displays normally.)

An optional parameter colwidth=30em can be set to make the list display in a variable number of fixed-width columns. (em, px, ex, in, cm, mm, pt, pc)

As of this writing(Sep-07-07), this template does not work in Internet Explorer. Slag 'em.[1]

For similar multicolumn display of long reference/footnote sections see: Template: reflist.


Technical note: This template references itself recursively, and a sub-template Template:Columnlist/Vomitorium as a balance of elegance and simplicity against wikiparser-induced profanity.[2]

Footnotes

  1. ↑ 'Not work' in this case means they see the same list without the pretty columns. The page does not break, it merely looks better on real browsers.
  2. ↑ Wikiparser is also invited to slag itself.