Template:Chapters: Difference between revisions
From The Transformers UK Appendix
Jump to navigationJump to search
Content added Content deleted
(Created page with "<includeonly>{| class="tt1_chapters {{#ifeq:{{{collapsible}}}|true|mw-collapsible mw-collapsed}}" style="{{#ifeq:{{{center|}}}|false||margin-left:auto;margin-right:auto;}}{{#if:{{{float|}}}|float:{{{float}}};|}}" |- class="tt1_chapters-header tt1_secondarynav{{#if:{{{style|}}}|<nowiki> </nowiki>style{{{style}}}|}}" {{#if:{{{headerbgcolor|}}}|style="background-color:{{{headerbgcolor}}}"}} | class="tt1-navigation_franchise-prev tti_buttonlink" |{{#if:{{{prev|}}}|{{{prev}...") |
No edit summary |
||
Line 8: | Line 8: | ||
{{!}} colspan="3" class="tt1_chapters-contents" {{#if:{{{align|}}}|style="text-align:{{{align}}};"|}}{{!}} |
{{!}} colspan="3" class="tt1_chapters-contents" {{#if:{{{align|}}}|style="text-align:{{{align}}};"|}}{{!}} |
||
{{{content}}}|}} |
{{{content}}}|}} |
||
|}</includeonly><noinclude>{{doc}} |
|}</includeonly><noinclude>{{/doc}} |
||
[[Category:Comic issue templates|Chapters]] |
[[Category:Comic issue templates|Chapters]] |
Latest revision as of 09:13, 10 September 2023
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]] }}
Result
This uses style 1 | |||
---|---|---|---|
Code
{{chapters |title=This uses style 2 |style=2 |content=*[[Optimus Prime]] }}
Result
This uses style 2 | |||
---|---|---|---|
Code
{{chapters |title=This uses style 3 |style=3 |content=*[[Optimus Prime]] }}
Result
This uses style 3 | |||
---|---|---|---|
Code
{{chapters |title=This is collapsible |collapsible=true |content=*[[Optimus Prime]] }}
Result
This is collapsible | |||
---|---|---|---|
Code
{{chapters |title=This has custom header colors |headerbgcolor=purple |headertextcolor=#FFFF00 |content=*[[Optimus Prime]] }}
Result
This has custom header colors | |||
---|---|---|---|
Code
{{chapters|title=Colin's Christmas Party|prev=The Transformers issue 249/Combat Colin|next=The Transformers issue 251/Combat Colin|center=true|align=left|float=none|style=2|collapsible=false|headerbgcolor=green|headertextcolor=red |content=*[[Combat Colin]] *[[Semi-Automatic Steve]] *[[Spider-Man]] *[[Hulk]] }}
Result
« | Colin's Christmas Party | » | |
---|---|---|---|