Template:TabRow: Difference between revisions
From TowersWiki
No edit summary |
No edit summary |
||
Line 9: | Line 9: | ||
The <name> field gives the TabRow a name to help with styling. | The <name> field gives the TabRow a name to help with styling. | ||
Give each tab a name via <Tab1Name>, <Tab2Name>, etc, up to <Tab10Name>. | Give each tab a name via <Tab1Name>, <Tab2Name>, etc, up to <Tab10Name>. | ||
From there, add your [[Template:TabPane]]s to the page. Note: the name field of each [[Template:TabPane]] must match the names of the tabs given to your TabRow. | From there, add your [[Template:TabPane]]s to the page. Note: the name field of each [[Template:TabPane]] must match the names of the tabs given to your TabRow, and the CASE-SENSITIVE. | ||
NOTE: There's not a lot of CSS here, so that those who wish to use the tabs can style them as much as they'd like. | |||
Example: | Example: | ||
<pre> | <pre> | ||
Line 16: | Line 17: | ||
{{TabPanel | {{TabPanel | ||
|row=forms | |row=forms | ||
|name= | |name=Homid | ||
| This is a pretty neat guy | | This is a pretty neat guy | ||
}} | }} | ||
{{TabPanel | {{TabPanel | ||
|row=forms | |row=forms | ||
|name= | |name=Glabro | ||
| This is a pretty neat guy in Glabro! | | This is a pretty neat guy in Glabro! | ||
}} | }} | ||
{{TabPanel | {{TabPanel | ||
|row=forms | |row=forms | ||
|name= | |name=Crinos | ||
| Oh noes! Warform! | | Oh noes! Warform! | ||
}} | }}{{TabPanel | ||
{{TabPanel | |||
|row=forms | |row=forms | ||
|name= | |name=Hispo | ||
| Pet the pretty dire wolf, it'll be fine! | | Pet the pretty dire wolf, it'll be fine! | ||
}} | }}{{TabPanel | ||
{{TabPanel | |||
|row=forms | |row=forms | ||
|name= | |name=Lupus | ||
| Woof Woof, I am wolf. | | Woof Woof, I am wolf. | ||
}}</pre> | }}</pre> | ||
Line 43: | Line 42: | ||
{{TabPanel | {{TabPanel | ||
|row=forms | |row=forms | ||
|name= | |name=Homid | ||
| This is a pretty neat guy | | This is a pretty neat guy | ||
}} | }} | ||
{{TabPanel | {{TabPanel | ||
|row=forms | |row=forms | ||
|name= | |name=Glabro | ||
| This is a pretty neat guy in Glabro! | | This is a pretty neat guy in Glabro! | ||
}} | }} | ||
{{TabPanel | {{TabPanel | ||
|row=forms | |row=forms | ||
|name= | |name=Crinos | ||
| Oh noes! Warform! | | Oh noes! Warform! | ||
}}{{TabPanel | }}{{TabPanel | ||
|row=forms | |row=forms | ||
|name= | |name=Hispo | ||
| Pet the pretty dire wolf, it'll be fine! | | Pet the pretty dire wolf, it'll be fine! | ||
}}{{TabPanel | }}{{TabPanel | ||
|row=forms | |row=forms | ||
|name= | |name=Lupus | ||
| Woof Woof, I am wolf. | | Woof Woof, I am wolf. | ||
}} | }} |
Revision as of 06:12, 21 July 2024
This template creates a row of Template:Tabs. These tabs can be clicked, which will then display the respective Template:TabPane.
Usage
The TabRow uses the following syntax:
{{TabRow |<Tab1Name>|<Tab2Name>|...<TabNName>|name=<name>}}
The <name> field gives the TabRow a name to help with styling. Give each tab a name via <Tab1Name>, <Tab2Name>, etc, up to <Tab10Name>. From there, add your Template:TabPanes to the page. Note: the name field of each Template:TabPane must match the names of the tabs given to your TabRow, and the CASE-SENSITIVE.
NOTE: There's not a lot of CSS here, so that those who wish to use the tabs can style them as much as they'd like. Example:
{{TabRow |Homid|Glabro|Crinos|Hispo|Lupus|name=forms}} {{TabPanel |row=forms |name=Homid | This is a pretty neat guy }} {{TabPanel |row=forms |name=Glabro | This is a pretty neat guy in Glabro! }} {{TabPanel |row=forms |name=Crinos | Oh noes! Warform! }}{{TabPanel |row=forms |name=Hispo | Pet the pretty dire wolf, it'll be fine! }}{{TabPanel |row=forms |name=Lupus | Woof Woof, I am wolf. }}
This will create a 5-panel TabRow, as seen here:
This is a pretty neat guy
This is a pretty neat guy in Glabro!
Oh noes! Warform!
Pet the pretty dire wolf, it'll be fine!
Woof Woof, I am wolf.