Template:Chapters: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Todo|Add {{code|mw-collapsible}} or something like that to hide more chapters by default unless users clicked on the Next button to see more chapters. Do not use {{t|Expand}} or {{t|ExpandBox}} with this as they made the article looks low quality.}}
{{Doc}}
{{Doc}}
<includeonly><onlyinclude>
<includeonly><onlyinclude>
{{Table
{{Table
| align = center
| align = center
| {{tr
| class = mw-collapsible {{#switch:{{{state|}}}|collapsed=mw-collapsed|#default=}}
| id = mw-customcollapsible-{{{{{game|hl2}}}|name|nt=0}}
| style = min-width: 770px; <!-- weird because the original width is 762px; but if its seamless then dont touch it -->
|1= {{tr
|bgcolor={{{{{game|hl2}}}|col}} <!-- game color is too intense as background, so overlay 60 % black below -->
|bgcolor={{{{{game|hl2}}}|col}} <!-- game color is too intense as background, so overlay 60 % black below -->
| {{th
| {{th
|colspan = 99 <!--may vary per game, 99 is ok -->
|colspan = 99 <!--may vary per game, 99 is ok -->
|bgcolor = rgba(0,0,0,.7) <!-- 60 % black -->
|bgcolor = rgba(0,0,0,.7) <!-- 60 % black -->
|{{#switch: {{{type}}} |#default
|1=<!--
IMPORTANT: For now, this is how it centers it correctly, if there are translations, REPLACE IT HERE TO CENTER THE TITLE
--><span style="float: left; user-select:none; color: transparent">{{Chapters/strings|TOGGLE}}</span><span>{{#switch: {{{type}}}
|#default
|chapters={{Chapters/strings|ChaptersTitle1}}|missions={{Chapters/strings|MissionsTitle1}}|camp|campaign|campaigns={{Chapters/strings|CampaignsTitle1}}}} {{{{{game|hl2}}}|2}} {{#switch: {{{type}}}
|chapters={{Chapters/strings|ChaptersTitle1}}|missions={{Chapters/strings|MissionsTitle1}}|camp|campaign|campaigns={{Chapters/strings|CampaignsTitle1}}}} {{{{{game|hl2}}}|2}} {{#switch: {{{type}}}
|#default
|#default
|chapters={{Chapters/strings|ChaptersTitle2}}|missions={{Chapters/strings|MissionsTitle2}}|camp|campaign|campaigns={{Chapters/strings|CampaignsTitle2}}}}
|chapters={{Chapters/strings|ChaptersTitle2}}|missions={{Chapters/strings|MissionsTitle2}}|camp|campaign|campaigns={{Chapters/strings|CampaignsTitle2}}}}</span><span class="mw-customtoggle-{{{{{game|hl2}}}|name|nt=0}}" style="float: right; user-select:none;">{{Chapters/strings|TOGGLE}}</span>
}}
}}
}}
}}
Line 33: Line 38:
|hl2ep2|ep2 = {{Chapters/Half-Life 2: Episode Two}}
|hl2ep2|ep2 = {{Chapters/Half-Life 2: Episode Two}}
|l4d|left4dead= {{Chapters/Left 4 Dead}}
|l4d|left4dead= {{Chapters/Left 4 Dead}}
|l4d2|left4dead2= {{Chapters/Left 4 Dead 2}}
|l4d2|left4dead2= {{Chapters/Left 4 Dead 2|state1={{{state1|}}}}}
|portal = {{Chapters/Portal}}
|portal = {{Chapters/Portal}}
|portal2|p2 = {{Chapters/Portal 2}}
|portal2|p2 = {{Chapters/Portal 2}}

Latest revision as of 04:22, 29 May 2025

English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Curly brackets white.pngTemplate Documentation [view] [edit]
Icon-translate.png Available doc translations
View
Page history
Icon-translate.png
This template uses a strings subpage
Please follow the format on this subpage(s) to add translations.
Number of strings:90
Approximate status of translation:English (en) 100% Deutsch (de) 57.78% Español (es) 22.22% Hrvatski (hr) 65.56% Русский (ru) 88.89% Tiếng Việt (vi) 6.67% 中文 (zh) 96.67% 
Gnome app science.png
This template uses a Testcases subpage
You can test how this page looks with it's different skins and parsers.

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