| Templat ini menggunakan
Lua
:
|
Templat digunakan dalam daftar di badan artikel, bukan di templat navigasi seperti
Templat:Navbox
. Templat ini dibuat berdasarkan
Template:Reflist
, tetapi berbeda karena teks yang akan ditampilkan dibuat secara manual alih-alih berupa daftar referensi.
Lebar setiap kolom dapat ditentukan menggunakan
|colwidth=
dan nilai dalam
em
.
{{columns-list|colwidth=
width
|
Teks (biasanya berupa daftar)
}}
Di sini,
width
menentukan lebar kolom, dan menentukan secara dinamis jumlah kolom berdasarkan lebar layar; lebih banyak kolom akan ditampilkan pada tampilan yang lebih luas.
Jika
|colwidth=
tidak ditentukan, lebar default
30em
akan digunakan.
Template ini menggunakan tata letak multi-kolom
CSS
3, yang tidak didukung oleh semua peramban
Web
.
Dukungan CSS3 peramban web tata letak multi-kolom
Properti
|
Internet
Explorer
|
Firefox
|
Safari
|
Chrome
|
Opera
|
column-width
column-count
|
≥ 10
(2012)
|
≥ 1.5
(2005)
|
≥ 3
(2007)
|
≥ 1
(2008)
|
≥ 11.1
(2011)
|
columns
|
≥ 10
(2012)
|
≥ 9
(2011)
|
≥ 3
(2007)
|
≥ 1
(2008)
|
≥ 11.1
(2011)
|
break-before
break-after
break-inside
|
≥ 10
(2012)
|
Tidak
|
Tidak
|
Tidak
|
≥ 11.1
(2011)
|
|
Berikut adalah contohnya:
{{columns-list|colwidth=35em|
* [[George Washington]]
* [[John Adams]]
* [[Thomas Jefferson]]
* [[James Madison]]
* [[James Monroe]]
}}
kode tersebut akan menghasilkan:
Gaya
CSS
juga dapat ditambahkan dengan parameter
|style=
, contoh:
{{columns-list|colwidth=15em|style=width: 600px; font-style: italic;|
* [[All About Lily Chou-Chou]]
* [[April Story]]
* [[Hana and Alice|Hana & Alice]]
* [[H?tai Club]]
* [[The Kon Ichikawa Story]]
* [[Love Letter (1995 film)|Love Letter]]
* [[New York, I Love You]]
* [[Picnic (1996 film)|Picnic]]
* [[Rainbow Song]]
* [[Swallowtail (film)|Swallowtail]]
}}
yang akan menghasilkan:
Templat ini juga berfungsi dengan daftar bernomor sebagai "teks"-nya. Sebagai contoh:
{{columns-list|colwidth=35em|
# [[George Washington]]
# [[John Adams]]
# [[Thomas Jefferson]]
# [[James Madison]]
# [[James Monroe]]
}}
The template, in fact, works with
everything
since all it does is wrap the text provided around a block to be divided into columns by CSS. Do not stop at wikitext lists – more advanced lists generated by
the HTML templates
will work too!
Use of the no-longer-supported parameter
|cols=
, or use of the first unnamed parameter (aka
|1=
) along with
|2=
or a second unnamed parameter for the template's content, will generate a red error message. To fix this error, use
|colwidth=
instead of attempting to specify the number of columns.
The presence of an equals sign within the template's content can also cause display problems and red error messages. To fix this problem, add
|1=
in front of the template's content.
Templat:Column-generating template families
Daftar HTML
|
---|
|
Horizontal
| |
---|
Berpoin
| |
---|
Tidak berpoin
| |
---|
Berurut
| |
---|
Glossary
(description,
definition,
association)
|
{{
glossary
}}
|
{{
glossary
}}
{{
term
|first term}}
{{
defn
|first description}}
{{term|second term}}
{{defn|second description}}
{{term|...}}
{{defn|....}}
{{
glossary end
}}
|
- first term
- first description
- second term
- second description
- ...
- ....
|
|
---|
Mengambang
|
{{
flowlist
}}
|
[[File:Bad Title Example.png|left|thumb|100px]]
{{
flowlist
|
*item1
*item2
*...
}}
|
|
|
---|
Multikolom
| |
---|
|