Difference between revisions of "Template:Page tabs"

From Freephile Wiki
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 8: Line 8:
  
 
==Example==
 
==Example==
 
+
<pre>{{page tabs
 
 
<nowiki>{{page tabs
 
 
|NOTOC = true
 
|NOTOC = true
 
|[[foo|Intro to Foo]]
 
|[[foo|Intro to Foo]]
Line 17: Line 15:
 
|[[foo/Subpage 3|Get involved with Foo]]
 
|[[foo/Subpage 3|Get involved with Foo]]
 
|This={{{This|1}}}
 
|This={{{This|1}}}
}}</nowiki> "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.
+
}}</pre>
 +
 
 +
"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 '''[[Example]]'''.  Go to each page in your tab set and put the template at the top of that page, in the form
 
Now, you'd save that page, lets say it was called '''[[Example]]'''.  Go to each page in your tab set and put the template at the top of that page, in the form
 +
 
<nowiki>{{Page tabs|This=1}}</nowiki> on that page, and use the same thing but change 'This=x' to reflect the number of the page your on.
 
<nowiki>{{Page tabs|This=1}}</nowiki> on that page, and use the same thing but change 'This=x' to reflect the number of the page your on.
  
 
An example has been done for this page at [[Tabs]] to demonstrate 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.
 
An example has been done for this page at [[Tabs]] to demonstrate 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.
 
</noinclude>
 
</noinclude>

Latest revision as of 14:17, 30 April 2014

{{{1}}}  
Documentation icon Template documentation[create]

This template provides a menu of tabs for linking different pages. Any number of tabs can be specified. Whichever tab is the current page is indicated by This= and the tab number to mark as the current tab. "'This='" makes the specified tab white instead of blue. You can add links to pages which don't have tabs on them; for example, the link 'main page' in the examples goes to the main page of Wikipedia.

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

Example[edit source]

{{page tabs
|NOTOC = true
|[[foo|Intro to Foo]]
|[[foo/Subpage 1|About Foo]]
|[[foo/Subpage 2|Foo alternatives]]
|[[foo/Subpage 3|Get involved with Foo]]
|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 Example. Go to each page in your tab set and put the template at the top of that page, in the form

{{Page tabs|This=1}} on that page, and use the same thing but change 'This=x' to reflect the number of the page your on.

An example has been done for this page at Tabs to demonstrate 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.