Template:Chapters: Difference between revisions
From MediaWiki
Jump to navigationJump to search
New page: <includeonly>{| class="tt1_chapters" {{#ifeq:{{{center|}}}|false||style="margin-left:auto;margin-right:auto;"}} |- class="tt1_chapters-header tt1_secondarynav" | class="tt1-navigation_fran... |
mNo edit summary |
||
| Line 7: | Line 7: | ||
| colspan="3" class="tt1_chapters-contents" | | | colspan="3" class="tt1_chapters-contents" | | ||
{{{contents}}} | {{{contents}}} | ||
|}</includeonly>< | |}</includeonly><noinclude>{{doc}} | ||
[[Category:Templates]] | [[Category:Templates]] | ||
</noinclude> | </noinclude> | ||
Revision as of 23:21, 15 April 2009
(Transcluded documentation: view)
Description
{{chapters}} is used to create a "Chapter Navigation" item. It is the basis for many of our navigation templates.
Usage
Parameters
Required
- title - A title.
Optional
- prev - The article name to which the previous nav button should point.
- next - The article name to which the next nav button should point.
- center - Centers the entire box unit, default is true.
- align - Aligns the text within the main box. Options are left, right and center. Default is center.
- float - Sets the CSS float style. Make sure to set "center=false" if you want to float this!
- style - Sets the header to one of the three default color schemes shown below. Anything other than 2 or 3 will result in style 1. Style 3 matches episode and comic issue info boxes.
- collapsible - Set to true if you want the main box to be able to collapse to just the title
- headerbgcolor - Sets the color of the header to whatever HTML/CSS compatible color specification you want. This will override the background set by style.
- headertextcolor - Sets the text color of the header. If the title is a link, this will not work and the text will either be white by default or if you set style 3 it will be black.
- content - What to display under the title bar.
Code
{{chapters
|title=A Title
|prev=Previous
|next=Next
|center=true
|align=left
|float=none
|style=2
|collapsible=false
|headerbgcolor=red
|headertextcolor=green
|content=*[[Santa Claus]]
*[[Christmas]]
*[[Optimus Prime (G1)|Optimus Prime]]
*[[Starscream (G1)|Starscream]]
}}
Examples
Code
{{chapters
|title=This uses style 1
|style=1
|content=*[[Optimus Prime (G1)|Optimus Prime]]
}}
Result
| This uses style 1 | ||
|---|---|---|
|
{{{contents}}} | ||
Code
{{chapters
|title=This uses style 2
|style=2
|content=*[[Optimus Prime (G1)|Optimus Prime]]
}}
Result
| This uses style 2 | ||
|---|---|---|
|
{{{contents}}} | ||
Code
{{chapters
|title=This uses style 3
|style=3
|content=*[[Optimus Prime (G1)|Optimus Prime]]
}}
Result
| This uses style 3 | ||
|---|---|---|
|
{{{contents}}} | ||
Code
{{chapters
|title=This is collapsible
|collapsible=true
|content=*[[Optimus Prime (G1)|Optimus Prime]]
}}
Result
| This is collapsible | ||
|---|---|---|
|
{{{contents}}} | ||
Code
{{chapters
|title=This has custom header colors
|headerbgcolor=purple
|headertextcolor=#FFFF00
|content=*[[Optimus Prime (G1)|Optimus Prime]]
}}
Result
| This has custom header colors | ||
|---|---|---|
|
{{{contents}}} | ||
Code
{{chapters|title=Christmas|prev=Halloween|next=January 1|center=true|align=left|float=none|style=2|collapsible=false|headerbgcolor=green|headertextcolor=red
|content=*[[Santa Claus]]
*[[Christmas]]
*[[Optimus Prime (G1)|Optimus Prime]]
*[[Starscream (G1)|Starscream]]
}}
Result
| « | Christmas | » |
|---|---|---|
|
{{{contents}}} | ||

