Sjabloon:Page tabs

Uit informatiestandaarden
Versie door Ahenket (overleg | bijdragen) op 17 jul 2013 om 22:07 (Nieuwe pagina aangemaakt met '{{#ifeq:{{{NOTOC|false}}}|true|__NOTOC__}} {{{!}} style="background:{{{Background|#F8FCFF}}}; text-align:center" width="100%" cellspacing="0" cellpadding="0" valign...')
(wijz) ← Oudere versie | Huidige versie (wijz) | Nieuwere versie → (wijz)
Ga naar: navigatie, zoeken
{{{1}}}    
[bewerken] [purge] Template documentation


Het sjabloon   De documentatie   De tabpagina   Hoofdpagina    
Shortcut:
Shortcut:


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



de:Vorlage:Tabs hsb:Předłoha:Rajtarki mk:Шаблон:ЈазичињаНаСтраници zh:Template:PageTabs