Template:Chapters/doc: Difference between revisions

From MediaWiki
Jump to navigationJump to search
Tigerpaw28 (talk | contribs)
Adding documentation and examples for the new functionality
Tigerpaw28 (talk | contribs)
m Moving the style documentation to be in the parameter list
Line 5: Line 5:
|prev=Previous (optional)
|prev=Previous (optional)
|next=Next (optional)
|next=Next (optional)
|center=true (optional, default is true. centers the entire box unit)
|center=true (optional, default is true. Centers the entire box unit)
|align=left (optional, [ left, center, right ] Default is center.  Aligns the text within the main box.)
|align=left (optional, [ left, center, right ] Default is center.  Aligns the text within the main box.)
|float=none (make sure to set "center=false" if you want to float this!)
|float=none (optional, make sure to set "center=false" if you want to float this!)
|style=2 (optional, 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=false (optional, set to true if you want the main box to be able to collapse to just the title)
|collapsible=false (optional, set to true if you want the main box to be able to collapse to just the title)
|headerbgcolor=red (optional, sets the color of the header to whatever HTML/CSS compatible color specification you want)
|headerbgcolor=red (optional, sets the color of the header to whatever HTML/CSS compatible color specification you want. This will override the background set by style.)
|headertextcolor=green (optional, 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.)
|headertextcolor=green (optional, 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=*[[List Item 1]]
|content=*[[List Item 1]]
Line 27: Line 28:
*[[List Item 5]]
*[[List Item 5]]
}}
}}
An optional parameter <tt>'''style=2'''</tt> creates a version with a gray header that can be used when you want to list items like this, or a tan header that matches episode/comic issue info templates.


{{chapters
{{chapters

Revision as of 04:10, 10 October 2020

{{chapters}} is used to create a "Chapter Navigation" item.

{{chapters
|title=A Title
|prev=Previous (optional)
|next=Next (optional)
|center=true (optional, default is true. Centers the entire box unit)
|align=left (optional, [ left, center, right ] Default is center.  Aligns the text within the main box.)
|float=none (optional, make sure to set "center=false" if you want to float this!)
|style=2 (optional, 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=false (optional, set to true if you want the main box to be able to collapse to just the title)
|headerbgcolor=red (optional, sets the color of the header to whatever HTML/CSS compatible color specification you want. This will override the background set by style.)
|headertextcolor=green (optional, 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=*[[List Item 1]]
*[[List Item 2]]
*[[List Item 3]]
*[[List Item 4]]
*[[List Item 5]]
}}
A Title
This uses style 1
This uses style 2
This uses style 3
This is collapsible
This has custom header colors