Template:Infobox TTP2 Puzzle: Difference between revisions

From The Talos Principle Wiki
Added image inside Puzzle Info Box, now with ParserFunctions!
puzzle type row does not appear if omitted
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{| style="float:right; border:1px solid black"
{| class="infobox"
! style="align:center; background-color: #c3b0cf" colspan=2| {{BASEPAGENAME}}
! style="background-color: #c3b0cf; color: black;" colspan=2| {{BASEPAGENAME}}
|-
|-
|colspan=2|{{#if:{{{image|}}}|[[{{{image}}}|frameless|250px|thumb|]]|}}
|colspan=2|{{#if:{{{image|}}}|[[File:{{{image}}}|frameless|250px|thumb|]]|}}
|-
|-
| Identifier:
| Identifier:
| style="text-align:right;" | {{{identifier|''Not set''}}}
| {{{identifier|''Not set''}}}
|-
|-
| Puzzle Type:
| Area:
| style="text-align:right;" | {{{puzzletype|''Type unknown''}}}
| {{{area|''Area unknown''}}}
|-
|-
{{#if: {{{puzzletype|}}} |
  {{!}} Puzzle Type:
  {{!}} {{{puzzletype}}}
  {{!}}-
  |
}}
| Previous Puzzle:
| Previous Puzzle:
| style="text-align:right;" | {{{previous|''None''}}}
| {{{previous|''None''}}}
|-
|-
| Next Puzzle:
| Next Puzzle:
| style="text-align:right;" | {{{next|''None''}}}
| {{{next|''None''}}}
|}
|}
<noinclude>
<noinclude>
 
An infobox for a puzzle from the second game.
 
This is a Infobox template for a Puzzle.
== Usage ==
== Usage ==
<pre>{{PuzzleInfobox
<pre>{{Infobox TTP2 Puzzle
|identifier = East 1-2
|identifier = East 1-3
|image = File:Casting.png
|image = East 1-3.jpg
|puzzletype = Regular
|area = [[Grasslands Ring]]
|previous = [[RGB Shifting]]
|puzzletype = [[:Category:TTP2 Main Puzzles|Main]]
|next = [[Castling]]
|previous = [[Reconnection]]
|next = [[Alternative Option]]
}}</pre>
}}</pre>
 
produces
Note how you specify the name of (optional) image: you have to include the "File:" namespace, but no square brackets. That should show up as the box below:
<div style="width: 300px">
<div style="width: 300px">
{{PuzzleInfobox
{{Infobox TTP2 Puzzle
|identifier = East 1-2
|identifier = East 1-3
|image = File:Casting.png
|image = East 1-3.jpg
|puzzletype = Regular
|area = [[Grasslands Ring]]
|previous = [[RGB Shifting]]
|puzzletype = [[:Category:TTP2 Main Puzzles|Main]]
|next = [[Castling]]
|previous = [[Reconnection]]
|next = [[Alternative Option]]
}}
}}
</div>
</div>


</noinclude>
</noinclude>

Latest revision as of 15:32, 16 June 2024

Infobox TTP2 Puzzle
Identifier: Not set
Area: Area unknown
Previous Puzzle: None
Next Puzzle: None

An infobox for a puzzle from the second game.

Usage

{{Infobox TTP2 Puzzle
|identifier = East 1-3
|image = East 1-3.jpg
|area = [[Grasslands Ring]]
|puzzletype = [[:Category:TTP2 Main Puzzles|Main]]
|previous = [[Reconnection]]
|next = [[Alternative Option]]
}}

produces

Infobox TTP2 Puzzle
Identifier: East 1-3
Area: Grasslands Ring
Puzzle Type: Main
Previous Puzzle: Reconnection
Next Puzzle: Alternative Option