Templat:Tabs/doc

Daripada Wikipedia, ensiklopedia bebas.

data. --> </no


Templat ini menyediakan menu tab untuk pautan laman-laman yang berbeza. Bilangan tab tidak terbatas. Tab yang digunakan untuk laman semasa ditetapkan dengan This= serta nombor tab untuk menandakan tab semasa. "'This='" akan menjadikan tab terpilih berwarna putih dan tidak biru. Anda dapat menambah pautan kepada laman-laman yang tidak mengandungi tab; misalnya pautan 'Laman Utama' dalam contoh akan memautkan tab kepada Laman Utama Wikipedia bahasa Melayu.

Dalam contoh-contoh di bawah ini, tukar "Contoh" kepada nama pengguna sebenar, dan "Sublaman 1" kepada nama-nama laman yang akan anda tambah.

Contoh[sunting sumber]

{{Tabs
|NOTOC = true
|[[Pengguna: Contoh]]
|[[Pengguna:Contoh/Sublaman 1]]
|[[Pengguna:Contoh/Sublaman 2|Sublaman kedua]]
|[[Pengguna:Contoh/Sublaman 3]]
|This={{{This|1}}}
}}

"This=" makes the default white tab page the first example. So if you don't put 'This=' on the page, the first tab would be white regardless of which page they were looking at. The first parameter suppresses the table of contents.

Now, you'd save that page, lets say it was called [[User:Example/tabs]] and then, go to each page, starting with [[User:Example]] and put the template at the top of that page, in the form {{User:Example/tabs|This=1}} on that page, and use the same thing but use This=2 instead of This=1 on "Subpage 2", and so on for This=3, etc.

An example has been done for this page at Template:Page tabs/tabs. Do not use this directly in your own set up, it is strictly for demonstrating how this works and documenting its use. Examine the page and the source to understand how to use this functionality. It is both fun to use and very useful in putting a condensed amount of information (such as cross-page links) in a very small space.

Here's how it looks if you put it on the bottom of the page, which is why you generally put it at the top:

data. --> </no


See also[sunting sumber]