Sjabloon:Page tabs
{{{1}}} |
This template employs intricate features of template syntax.
You are encouraged to familiarise yourself with its setup and parser functions before editing the template. If your edit causes unexpected problems, please undo it quickly, as this template may appear on a large number of pages. Remember that you can conduct experiments, and should test all improvements, in either the general Template sandbox or your user space before changing anything here. |
Het sjabloon | De documentatie | De tabpagina | Hoofdpagina |
Usage
Usage: 1 to 12 parameters for each tab to put on the page. Whichever parameter is the current page is indicated by This= and the tab number to mark as the current tab, from 1 to 12. The "'This='" parameter allows the tab for the current page that the user is looking at to be white instead of blue. Note that in the example above (and below) the item 'main page' refers to the main page of Wikipedia; if you click on it, you will go there. This is to show that you can put links to pages that do not have tabs on them.
Generally, you'd use this template where you had several pages and wanted them all to link to each other in the same way, and if you added new pages, they would consistently appear in the same place, such as your user page and your talk page.
Note that in the examples below, you would change "Example" to whatever user name it actually was, and "Subpage 1", etc., to the page names you are going to use.
One way to do this is to create a tabs page, which would consist of the following:
{{page tabs |NOTOC = true |[[User:Example]] |[[User:Example/Subpage 1]] |[[User:Example/Subpage 2|Second subpage]] |[[User:Example/Subpage 3]] |This={{{This|1}}} }}
In the above example, the last parameter makes the default white tab page the first example if you don't change it. 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. You can have up to 12 tabbed pages using this template.
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:
Het sjabloon | De documentatie | De tabpagina | Hoofdpagina |
See also
- {{Page tabs/1}}
- {{Page tabs/2}}
de:Vorlage:Tabs
hsb:Předłoha:Rajtarki
mk:Шаблон:ЈазичињаНаСтраници
zh:Template:PageTabs
The above documentation is transcluded from Sjabloon:Page tabs/doc. (edit | history) Editors can experiment in this template's sandbox (create) and testcases (create) pages. Please add categories and interwikis to the /doc subpage. Subpages of this template. |