Template:PageTabs

From AIE Wiki
Revision as of 22:50, 16 March 2009 by Stigg (talk | contribs) (New page: {{PageTabsTop|NOTOC={{{NOTOC|false}}}}} {{PageTab{{ #ifeq:{{{This}}}|1|1|2}}|{{{1}}}}} {{ #if: {{{2|}}} |{{PageTab{{ #ifeq:{{{This}}}|2|1|2}}|{{{2}}}}} {{ #if: {{{3|}}} |{{PageTab{{ #ife...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
{{{1}}}    


Usage

Usage: 1 to 9 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 9. 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 macro 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. Like your user page and comments on it.

Note that in the examples below, you would change "User_Example" to whatever user name it actually was, and "First Page", 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:

{{PageTabs
|NOTOC = true
|[[User_Example:First Page]]  
|[[User_Example:Second Page]]
|[[User_Example:Third Page|Alternate Name for third page]]
|[[User_Example:Fourth Page]]
|This={{{This|1}}}
}}

In the above example, the last item 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 item suppresses the table of content.

Now, you'd save that page, lets say it was called [[User_Example:Tabs]] and then, go to each page, starting with [[User_Example:First Page]] and put a macro call 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 "Second Page", and so on for This=3, etc. You can have up to 9 pages using this macro.