Template:Chapters/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Now fixed.)
No edit summary
Line 2: Line 2:
{{Note|Currently work in progress. Documentation will be improved later.}}
{{Note|Currently work in progress. Documentation will be improved later.}}


This template is used to list all game chapters, or missions.
This template is used to list all game chapters, campaign or missions.


== Usage ==
== Testcases ==
* Use {{code|<nowiki>{{Chapters}}</nowiki>}} or {{code|<nowiki>{{Chapters|game=hl2}}</nowiki>}} to list all of {{hl2|4}} Chapters, using {{tl|link=Table}} template. <br>
*For more examples, visit [[/testcases|Testcases]] page.
* Use {{code|<nowiki>{{Chapters|game=hl}}</nowiki>}} for {{hl|4}} chapters.
* Use {{code|<nowiki>{{Chapters|game=portal2}}</nowiki>}} or {{code|<nowiki>{{Chapters|game=p2}}</nowiki>}} for {{portal2|4}} chapters.


== Examples ==
== Parameters ==
{| cellpadding=8 style="background:transparent"
{| class="standard-table" style="width:100%"
| {{tlc|Chapters}}
! style="width:15%" | {{Dictionary/common|Param}}
| &rarr;
! style="text-align:center" | {{Dictionary/common|Desc}}
| <br>{{Chapters}}
! style="text-align:center" | Value
! {{Dictionary/common|Previews}}
|-
|-
| {{tlc|Chapters|game{{=}}hl}}
| align="center" | None
| &rarr;
| align="center" | Default appearance
| <br>{{Chapters|game=hl}}
| N/A
| {{Chapters}}
|-
|-
| {{tlc|Chapters|game{{=}}l4d|type{{=}}camp}}
| align="center" | {{Code|style=2|{{Param|type}}}}
| &rarr;
| align="center" | Game name, uses anything that are based off {{t|Software}} template.
| <br>{{Chapters|game=l4d|type=camp}}
| {{CodeBlock|margin=5px|<nowiki>| game = hl</nowiki>}}
| {{Chapters|game=hl}}
|-
| align="center" | {{Code|style=2|{{Param|type}}}}
| align="center" | Chapters, campaigns or missions.
| {{CodeBlock|margin=5px|<nowiki>| type = chapters</nowiki>}}{{CodeBlock|margin=5px|<nowiki>| type = camp</nowiki>}}{{CodeBlock|margin=5px|<nowiki>| type = missions</nowiki>}}
| {{Chapters|game=l4d|type=camp}}
|-
|-
! rowspan=3 | For more examples, visit [[/testcases|Testcases]] page.
|}
|}

Revision as of 01:15, 30 July 2023

Edit-copy.png
This is a documentation subpage for Template:Chapters.
Don't forget to purge the contents of the base page upon creating or editing this subpage.
Note.pngNote:Currently work in progress. Documentation will be improved later.

This template is used to list all game chapters, campaign or missions.

Testcases

Parameters

Parameter Description Value Previews
None Default appearance N/A
{{{type}}} Game name, uses anything that are based off {{Software}} template.
| game = hl
{{{type}}} Chapters, campaigns or missions.
| type = chapters
| type = camp
| type = missions