nitrc:User Guide - MediaWiki Tabs
From NITRC Wiki
You can create tabbed pages on your MediaWiki page that look like this:
| Demo Tab 1 | Demo Tab 2 | Demo Tab 3 | Demo Tab 4 | Demo Tab 5 | Demo Tab 6 | Demo Tab 7 | Demo Tab 8 | Demo Tab 9 |
Example Page (Tab 1) – Welcome!
This is an example of the text that should appear on the Tab 1.
When you look at the source notice that This=1 when you call DemoTabs/TabsHeader.
Each tabbed page is a separate wiki page. On a very basic level each page is setting up a table, defining the style of the cells, to create the look of the tabs. To allow for flexibility and conciseness, this example uses templates and parser functions.
The following templates are being called to create the tabbed pages:
- nitrc:DemoTabs/TabsTop: Starts the table, defining the style of the overall table.
- nitrc:DemoTabs/Tab1: Defines the cell style to create the look of a selected foreground tab.
- nitrc:DemoTabs/Tab2: Defines the cell style to create the look of a non-selected background tab.
- nitrc:DemoTabs/TabsBottom: Ends the table.
- nitrc:DemoTabs/Tabs: Calls DemoTabs/TabsTop, DemoTabs/Tab1, DemoTabs/Tab2, and DemoTabs/TabsBottom to create the tabs. The wiki page that is calling this template uses DemoTabs/Tab1 for its tab; all the other tabs are defined by DemoTabs/Tab2. This is where the parser functions are used to compare strings to determine which template to call.
- nitrc:DemoTabs/TabsHeader: Calls DemoTabs/Tabs, providing the page link and tab labels for each tab.
- nitrc:DemoTabs/PageStyle: Defines the look of the tabbed page below the tabs.








