Citakan:Cmn/doc

Ti Wikipédia Sunda, énsiklopédi bébas

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.

Penggunaan[édit sumber]

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 CSS3, yang tidak didukung oleh semua peramban Web. Citakan:CSS3 multiple column layout

Contoh[édit sumber]

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!

Pesan galat[édit sumber]

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.

Pengalihan[édit sumber]

Kategori pelacak[édit sumber]

Lihat pula[édit sumber]

Citakan:Column-generating template families Citakan:HTML lists