Template:Chapters: Difference between revisions
From MediaWiki
Jump to navigationJump to search
No edit summary |
mNo edit summary |
||
| Line 2: | Line 2: | ||
|- class="tt1_chapters-header tt1_secondarynav" {{#ifeq:{{{style|}}}|2|style="background-color:#aaa;"|}} | |- class="tt1_chapters-header tt1_secondarynav" {{#ifeq:{{{style|}}}|2|style="background-color:#aaa;"|}} | ||
| class="tt1-navigation_franchise-prev tti_buttonlink" |{{#if:{{{prev|}}}|[[{{{prev}}}|«]]|}} | | class="tt1-navigation_franchise-prev tti_buttonlink" |{{#if:{{{prev|}}}|[[{{{prev}}}|«]]|}} | ||
!class="tt1_chapters-header-title"|{{{title}}} | !class="tt1_chapters-header-title" width="100%"|{{{title}}} | ||
| class="tt1-navigation_franchise-next tti_buttonlink" align="right"|{{#if:{{{next|}}}|[[{{{next}}}|»]]|}} | | class="tt1-navigation_franchise-next tti_buttonlink" align="right"|{{#if:{{{next|}}}|[[{{{next}}}|»]]|}} | ||
|- | |- | ||
Revision as of 20:45, 24 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 | ||
|---|---|---|
Code
{{chapters
|title=This uses style 2
|style=2
|content=*[[Optimus Prime (G1)|Optimus Prime]]
}}
Result
| This uses style 2 | ||
|---|---|---|
Code
{{chapters
|title=This uses style 3
|style=3
|content=*[[Optimus Prime (G1)|Optimus Prime]]
}}
Result
| This uses style 3 | ||
|---|---|---|
Code
{{chapters
|title=This is collapsible
|collapsible=true
|content=*[[Optimus Prime (G1)|Optimus Prime]]
}}
Result
| This is collapsible | ||
|---|---|---|
Code
{{chapters
|title=This has custom header colors
|headerbgcolor=purple
|headertextcolor=#FFFF00
|content=*[[Optimus Prime (G1)|Optimus Prime]]
}}
Result
| This has custom header colors | ||
|---|---|---|
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 | » |
|---|---|---|

