Bantuan:Templat: Perbezaan antara semakan
Kandungan dihapus Kandungan ditambah
k →Umum: Sedikit penterjemahan. |
Teg-teg: Suntingan mudah alih Suntingan web mudah alih |
||
Baris 40:
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.
Jika anda ingin mencuba templat-templat di bawah, sila gunakan [[Templat:Kotak pasir|templat kotak pasir]]
====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:
{| class="wikitable" style="text-align:center"
|+
! Penerangan !! Perkataan yang dimasukkan !! Hasilnya
|-
| Hanya {{tl|Tc}}
|<nowiki>{{tc}}</nowiki>
|{{tc}}
|-
|
|<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...
|-
|
|<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...
|}
''"dalam"'' yang disertakan dalam '[[#noinclude|noinclude]]', yang akan dibincangkan kemudian.
====Templat
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"
|