Template:Page tabs/doc

From SEG Wiki
Jump to: navigation, search


This is the instruction page for Template:Page tabs, and is included on that page.

This template is when an editor has 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.

An editor can add 1 to 12 tabs on the page. Whichever tab is the current page is indicated by This= and the tab number to mark as the current tab, from 1 to 12. "'This='" makes the tab for the current page that the user is looking at to be white instead of blue.

The tab link 'main page' in the examples refers to the main page of Wikipedia; if you click on it, you will go to the main page. This shows that you can put links to pages that do not have tabs on them.

In the examples below, change "Example" to whatever user name it actually was, and "Subpage 1", etc., to the page names you will add.


{{page tabs
|NOTOC = true
|[[User:Example/Subpage 1]]
|[[User:Example/Subpage 2|Second subpage]]
|[[User:Example/Subpage 3]]

"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. 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:


See also