Template:Chapters/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Removed L4D2 examples to prevent clutter after added temporarily for previewing edit.)
m (Preview and Value from Dictionary)
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{doc/subpage}}
{{doc/subpage}}
{{Note|Currently work in progress. But it can be used in most pages now.}}
This template is used to list all game chapters, campaign or missions. Chapters name (and titlebar itself) are also translated automatically, but users can add new translations on the [[/strings|strings subpage]].
 
This template is used to list all game chapters, campaign or missions.
 
== Testcases ==
*For more examples, visit [[/testcases|Testcases]] page.


== Parameters ==
== Parameters ==
Line 11: Line 6:
! style="width:15%" | {{Dictionary/common|Param}}
! style="width:15%" | {{Dictionary/common|Param}}
! style="text-align:center" | {{Dictionary/common|Desc}}
! style="text-align:center" | {{Dictionary/common|Desc}}
! style="text-align:center" | Value
! style="text-align:center" | {{Dictionary/common|Value}}
! {{Dictionary/common|Previews}}
! {{Dictionary/common|Preview}}
|-
|-
| align="center" | None
| align="center" | None
| align="center" | Default appearance  
| align="center" | Default appearance<br><small>(''By default its expanded, for the documentation, its collapsed'')</small>
| N/A
| N/A
| {{Chapters}}
| {{Chapters|state=collapsed}}
|-
|-
| align="center" | {{Code|style=2|{{Param|type}}}}
| align="center" | {{Code|style=2|{{Param|game}}}}
| align="center" | Game name, uses anything that are based off {{t|Software}} template.
| align="center" | Game name, uses anything that are based off {{t|Software}} template.
| {{CodeBlock|margin=5px|<nowiki>| game = hl</nowiki>}}
| {{CodeBlock|margin=5px|<nowiki>| game = hl</nowiki>}}
| {{Chapters|game=hl}}
| {{Chapters|game=hl|state=collapsed}}
|-
|-
| align="center" | {{Code|style=2|{{Param|type}}}}
| align="center" | {{Code|style=2|{{Param|type}}}}
| align="center" | Changes the title bar to Chapters, campaigns or missions.
| align="center" | Changes the title bar to 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>}}
| {{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}}
| {{Chapters|game=l4d|type=camp|state=collapsed}}
|-
| align="center" | {{Code|style=2|{{Param|state}}}} ~ {{Code|style=2|{{Param|state<?>}}}}
| align="center" | Collapses the chapters. <br>(<code><?></code>: Unknown amount of states, used in "Template:Chapters/<game name>")
| {{CodeBlock|margin=5px|<nowiki>| state = collapsed</nowiki>}}<br>{{CodeBlock|margin=5px|<nowiki>| state1 = collapsed</nowiki>}}
| {{Chapters|game=hla|type=camp|state=collapsed}}{{Chapters|game=l4d2|type=camp|state1=collapsed}}
|-
|-
|}
|}

Latest revision as of 10:02, 15 September 2025

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.

This template is used to list all game chapters, campaign or missions. Chapters name (and titlebar itself) are also translated automatically, but users can add new translations on the strings subpage.

Parameters

Parameter Description Value Preview
None Default appearance
(By default its expanded, for the documentation, its collapsed)
N/A
{{{game}}} Game name, uses anything that are based off {{Software}} template.
| game = hl
{{{type}}} Changes the title bar to Chapters, campaigns or missions.
| type = chapters
| type = camp
| type = missions
{{{state}}} ~ {{{state<?>}}} Collapses the chapters.
(<?>: Unknown amount of states, used in "Template:Chapters/<game name>")
| state = collapsed

| state1 = collapsed