Bantuan:Templat: Perbezaan antara semakan

Pergi ke pandu arah Pergi ke carian
k (→‎Umum: Sedikit penterjemahan.)
Teg-teg: Suntingan mudah alih Suntingan web mudah alih
Attempting to transclude a template that does not exist produces a redlink, just like linking to any other nonexistent page. Following the link allows one to create that particular template.
 
===Contoh penggunaan templat==
Jika anda ingin mencuba templat-templat di bawah, sila gunakan [[Templat:Kotak pasir|templat kotak pasir]]
If you wish to experiment with any of these, please use the [[Template:Template sandbox|template sandbox]]
 
====Templat dengan tiada parameter====
Untuk melihat contoh templat yang paling mudah, perhatikan [[Template:Tc]]. Templat ini membantu mengalihkan huruf di ''"dalam"'' ke halaman lain. Contohnya, menyunting frasa berikut ke mana-mana halaman akan menghasilkan hasil seperti di bawah:
To see an example of a very simple template, look at [[Template:Tc]]. This template does nothing more than tranclude the letters ''"in"'' into other pages. For instance, editing the following phrases into any page will yield the associated results:
{| class="wikitable" style="text-align:center"
|+UsingMenggunakan the templatetemplat {{tl|tc}}
! Penerangan !! Perkataan yang dimasukkan !! Hasilnya
! Description !! Text Entered !! Result after Processing
|-
| Hanya {{tl|Tc}} by itself
|<nowiki>{{tc}}</nowiki>
|{{tc}}
|-
|SingleHanya usesatu ofpenggunaan {{tl|tc}} dalam teks
|<nowiki>{{tc}} 2009, with Barack Obama settling into the White House, we find the beginning of...</nowiki>
|{{tc}} 2009, with Barack Obama settling into the White House, we find the beginning of...
|-
|Multiple uses ofPenggunaan {{tl|tc}} yang banyak dalam teks
|<nowiki>{{tc}} 2009, with Barack Obama settl{{tc}}g {{tc}}to the White House, we f{{tc}}d the beg{{tc}}n{{tc}}g of...</nowiki>
|{{tc}} 2009, with Barack Obama settl{{tc}}g {{tc}}to the White House, we f{{tc}}d the beg{{tc}}n{{tc}}g of...
|}
You'llAnda noticeakan thatperasan thebahawa templatetemplat includestersebut onlyhanya themengandungi lettershuruf ''"indalam"'' whenapabila transcludeddikosongkan, despitewalaupun theada explanatoryteks textpenjelasan onpada thehalaman template pagetemplat ("ThisTemplat templateini isdigunakan used..." clickklik onpada thepautan templatetemplat linkdi aboveatas tountuk seemelihat). Jika Ifanda youmenyunting edit the templatehalaman pagetemplat, (clickklik [http://en.wikipedia.org/w/index.php?title=Template:Tc&action=edit thispautan linkini]), you'llanda seeakan thatmelihat everythingsemuanya exceptkecuali thehuruf-huruf letters ''"in"'' is enclosed in '[[#noinclude|noinclude]]' tags, discussed later.di
''"dalam"'' yang disertakan dalam '[[#noinclude|noinclude]]', yang akan dibincangkan kemudian.
 
====Templat dengan parameter tiada nama====
Transclusion with parameters is only slightly more complicated. For a quick example, the famous [[dead man's hand]] can be reproduced by the following templates, using unnamed parameters:
{| class="wikitable" style="text-align:center"

Menu pandu arah