Difference between revisions of "Template:Infobox"

From Salem Wiki
Jump to: navigation, search
m (oops forgot test value in page)
m (Preparation for custom stylesheet-file)
Line 18: Line 18:
 
}}><!--
 
}}><!--
 
*** HEADER ***
 
*** HEADER ***
--><tr {{#ifeq: {{{inlineTheme|yes}}} | yes
+
--><tr class="IBheader" {{#ifeq: {{{inlineTheme|yes}}} | yes
 
| style="background-color:{{
 
| style="background-color:{{
 
#if: {{{inlineThemeBkgColor2|}}}
 
#if: {{{inlineThemeBkgColor2|}}}
Line 44: Line 44:
 
*** BODY ***
 
*** BODY ***
 
*** IMAGE's + CAPTION ***
 
*** IMAGE's + CAPTION ***
--><tr {{#ifeq: {{{inlineTheme|yes}}} | yes
+
--><tr class="IBintro" {{#ifeq: {{{inlineTheme|yes}}} | yes
 
| style="background-color:{{
 
| style="background-color:{{
 
#if: {{{inlineThemeBkgColor3|}}}
 
#if: {{{inlineThemeBkgColor3|}}}
Line 85: Line 85:
 
*** RequiresTech ***
 
*** RequiresTech ***
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|RequiresTech}}
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|RequiresTech}}
| <tr {{#ifeq: {{{inlineTheme|yes}}} | yes
+
| <tr class="IBinfo" {{#ifeq: {{{inlineTheme|yes}}} | yes
 
| style="background-color:{{
 
| style="background-color:{{
 
#if: {{{inlineThemeBkgColor4|}}}
 
#if: {{{inlineThemeBkgColor4|}}}
Line 92: Line 92:
 
}};"
 
}};"
 
}}><!--
 
}}><!--
--><td style="text-align:right; font-weight:bold;"><!--
+
--><td class="IBleft" style="text-align:right; font-weight:bold;"><!--
 
-->[[:Category:Skills|Technology]] Required:<!--
 
-->[[:Category:Skills|Technology]] Required:<!--
 
--></td><!--
 
--></td><!--
--><td style="text-align:left;"><!--
+
--><td class="IBright" style="text-align:left;"><!--
 
-->{{PropVals
 
-->{{PropVals
 
|prop=RequiresTech
 
|prop=RequiresTech
Line 105: Line 105:
 
*** UnlocksTech ***
 
*** UnlocksTech ***
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|UnlocksTech}}
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|UnlocksTech}}
| <tr {{#ifeq: {{{inlineTheme|yes}}} | yes
+
| <tr class="IBinfo" {{#ifeq: {{{inlineTheme|yes}}} | yes
 
| style="background-color:{{
 
| style="background-color:{{
 
#if: {{{inlineThemeBkgColor4|}}}
 
#if: {{{inlineThemeBkgColor4|}}}
Line 112: Line 112:
 
}};"
 
}};"
 
}}><!--
 
}}><!--
--><td style="text-align:right; font-weight:bold;"><!--
+
--><td class="IBleft" style="text-align:right; font-weight:bold;"><!--
 
-->[[:Category:Skills|Technology]] Unlocked:<!--
 
-->[[:Category:Skills|Technology]] Unlocked:<!--
 
--></td><!--
 
--></td><!--
--><td style="text-align:left;"><!--
+
--><td class="IBright" style="text-align:left;"><!--
 
-->{{PropVals
 
-->{{PropVals
 
|prop=UnlocksTech
 
|prop=UnlocksTech
Line 125: Line 125:
 
*** RequiresObj ***
 
*** RequiresObj ***
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|RequiresObj}}
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|RequiresObj}}
| <tr {{#ifeq: {{{inlineTheme|yes}}} | yes
+
| <tr class="IBinfo" {{#ifeq: {{{inlineTheme|yes}}} | yes
 
| style="background-color:{{
 
| style="background-color:{{
 
#if: {{{inlineThemeBkgColor4|}}}
 
#if: {{{inlineThemeBkgColor4|}}}
Line 132: Line 132:
 
}};"
 
}};"
 
}}><!--
 
}}><!--
--><td style="text-align:right; font-weight:bold;"><!--
+
--><td class="IBleft" style="text-align:right; font-weight:bold;"><!--
 
-->[[:Category:Objects|Object(s)]] Required:<!--
 
-->[[:Category:Objects|Object(s)]] Required:<!--
 
--></td><!--
 
--></td><!--
--><td style="text-align:left;"><!--
+
--><td class="IBright" style="text-align:left;"><!--
 
-->{{PropVals
 
-->{{PropVals
 
|prop=RequiresObj
 
|prop=RequiresObj
Line 146: Line 146:
 
*** RepairedWith ***
 
*** RepairedWith ***
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|RepairedWith}}
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|RepairedWith}}
| <tr {{#ifeq: {{{inlineTheme|yes}}} | yes
+
| <tr class="IBinfo" {{#ifeq: {{{inlineTheme|yes}}} | yes
 
| style="background-color:{{
 
| style="background-color:{{
 
#if: {{{inlineThemeBkgColor4|}}}
 
#if: {{{inlineThemeBkgColor4|}}}
Line 153: Line 153:
 
}};"
 
}};"
 
}}><!--
 
}}><!--
--><td style="text-align:right; font-weight:bold;"><!--
+
--><td class="IBleft" style="text-align:right; font-weight:bold;"><!--
 
-->Repaired With:<!--
 
-->Repaired With:<!--
 
--></td><!--
 
--></td><!--
--><td style="text-align:left;"><!--
+
--><td class="IBright" style="text-align:left;"><!--
 
-->{{PropVals
 
-->{{PropVals
 
|prop=RepairedWith
 
|prop=RepairedWith
Line 166: Line 166:
 
*** Separator for: IsLiftable/IsLiftableWhenEmpty/HP/Soak ***
 
*** Separator for: IsLiftable/IsLiftableWhenEmpty/HP/Soak ***
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|IsLiftable}}{{HasProp|page={{{page|{{FULLPAGENAME}} }}}|IsLiftableWhenEmpty}}{{HasProp|page={{{page|{{FULLPAGENAME}} }}}|HP}}{{HasProp|page={{{page|{{FULLPAGENAME}} }}}|Soak}}
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|IsLiftable}}{{HasProp|page={{{page|{{FULLPAGENAME}} }}}|IsLiftableWhenEmpty}}{{HasProp|page={{{page|{{FULLPAGENAME}} }}}|HP}}{{HasProp|page={{{page|{{FULLPAGENAME}} }}}|Soak}}
| <tr {{#ifeq: {{{inlineTheme|yes}}} | yes
+
| <tr class="IBsep" {{#ifeq: {{{inlineTheme|yes}}} | yes
 
| style="background-color:{{
 
| style="background-color:{{
 
#if: {{{inlineThemeBkgColor3|}}}
 
#if: {{{inlineThemeBkgColor3|}}}
Line 178: Line 178:
 
*** IsLiftable/IsLiftableWhenEmpty ***
 
*** IsLiftable/IsLiftableWhenEmpty ***
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|IsLiftable}}{{HasProp|page={{{page|{{FULLPAGENAME}} }}}|IsLiftableWhenEmpty}}
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|IsLiftable}}{{HasProp|page={{{page|{{FULLPAGENAME}} }}}|IsLiftableWhenEmpty}}
| <tr {{#ifeq: {{{inlineTheme|yes}}} | yes
+
| <tr class="IBinfo" {{#ifeq: {{{inlineTheme|yes}}} | yes
 
| style="background-color:{{
 
| style="background-color:{{
 
#if: {{{inlineThemeBkgColor4|}}}
 
#if: {{{inlineThemeBkgColor4|}}}
Line 185: Line 185:
 
}};"
 
}};"
 
}}><!--
 
}}><!--
--><td style="text-align:right; font-weight:bold;"><!--
+
--><td class="IBleft" style="text-align:right; font-weight:bold;"><!--
 
-->Liftable?<!--
 
-->Liftable?<!--
 
--></td><!--
 
--></td><!--
--><td style="text-align:center;"><!--
+
--><td class="IBrightC" style="text-align:center;"><!--
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|IsLiftableWhenEmpty}}
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|IsLiftableWhenEmpty}}
 
| {{#ifeq: true | {{#show: {{{page|{{FULLPAGENAME}} }}} |?IsLiftableWhenEmpty |link=none}}
 
| {{#ifeq: true | {{#show: {{{page|{{FULLPAGENAME}} }}} |?IsLiftableWhenEmpty |link=none}}
Line 203: Line 203:
 
*** Locations ***
 
*** Locations ***
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|Locations}}
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|Locations}}
| <tr {{#ifeq: {{{inlineTheme|yes}}} | yes
+
| <tr class="IBinfo" {{#ifeq: {{{inlineTheme|yes}}} | yes
 
| style="background-color:{{
 
| style="background-color:{{
 
#if: {{{inlineThemeBkgColor4|}}}
 
#if: {{{inlineThemeBkgColor4|}}}
Line 210: Line 210:
 
}};"
 
}};"
 
}}><!--
 
}}><!--
--><td style="text-align:right; font-weight:bold;"><!--
+
--><td class="IBleft" style="text-align:right; font-weight:bold;"><!--
 
-->[[Terrain|Location]]s found:<!--
 
-->[[Terrain|Location]]s found:<!--
 
--></td><!--
 
--></td><!--
--><td style="text-align:left;"><!--
+
--><td class="IBright" style="text-align:left;"><!--
 
-->{{List Locations
 
-->{{List Locations
 
|page={{{page|{{FULLPAGENAME}} }}}
 
|page={{{page|{{FULLPAGENAME}} }}}
Line 222: Line 222:
 
*** HP ***
 
*** HP ***
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|HP}}
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|HP}}
| <tr {{#ifeq: {{{inlineTheme|yes}}} | yes
+
| <tr class="IBinfo" {{#ifeq: {{{inlineTheme|yes}}} | yes
 
| style="background-color:{{
 
| style="background-color:{{
 
#if: {{{inlineThemeBkgColor4|}}}
 
#if: {{{inlineThemeBkgColor4|}}}
Line 229: Line 229:
 
}};"
 
}};"
 
}}><!--
 
}}><!--
--><td style="text-align:right; font-weight:bold;"><!--
+
--><td class="IBleft" style="text-align:right; font-weight:bold;"><!--
 
-->[[Structure Damage|Hit Points]]:<!--
 
-->[[Structure Damage|Hit Points]]:<!--
 
--></td><!--
 
--></td><!--
--><td style="text-align:center;"><!--
+
--><td class="IBrightC" style="text-align:center;"><!--
 
-->{{#ifeq: 0 | {{#show: {{{page|{{FULLPAGENAME}} }}} |?HP |link=none}}
 
-->{{#ifeq: 0 | {{#show: {{{page|{{FULLPAGENAME}} }}} |?HP |link=none}}
 
| Still unknown
 
| Still unknown
Line 242: Line 242:
 
*** Soak ***
 
*** Soak ***
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|Soak}}
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|Soak}}
| <tr {{#ifeq: {{{inlineTheme|yes}}} | yes
+
| <tr class="IBinfo" {{#ifeq: {{{inlineTheme|yes}}} | yes
 
| style="background-color:{{
 
| style="background-color:{{
 
#if: {{{inlineThemeBkgColor4|}}}
 
#if: {{{inlineThemeBkgColor4|}}}
Line 249: Line 249:
 
}};"
 
}};"
 
}}><!--
 
}}><!--
--><td style="text-align:right; font-weight:bold;"><!--
+
--><td class="IBleft" style="text-align:right; font-weight:bold;"><!--
 
-->[[Soak]] Value:<!--
 
-->[[Soak]] Value:<!--
 
--></td><!--
 
--></td><!--
--><td style="text-align:center;"><!--
+
--><td class="IBrightC" style="text-align:center;"><!--
 
-->{{#ifeq: 0 | {{#show: {{{page|{{FULLPAGENAME}} }}} |?Soak |link=none}}
 
-->{{#ifeq: 0 | {{#show: {{{page|{{FULLPAGENAME}} }}} |?Soak |link=none}}
 
| Still unknown
 
| Still unknown
Line 262: Line 262:
 
*** Loot ***
 
*** Loot ***
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|Loot}}
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|Loot}}
| <tr {{#ifeq: {{{inlineTheme|yes}}} | yes
+
| <tr class="IBsep" {{#ifeq: {{{inlineTheme|yes}}} | yes
 
| style="background-color:{{
 
| style="background-color:{{
 
#if: {{{inlineThemeBkgColor3|}}}
 
#if: {{{inlineThemeBkgColor3|}}}
Line 271: Line 271:
 
--><td colspan="2" style="padding:2px;"></td><!--
 
--><td colspan="2" style="padding:2px;"></td><!--
 
--></tr><!--
 
--></tr><!--
--><tr {{#ifeq: {{{inlineTheme|yes}}} | yes
+
--><tr class="IBinfo" {{#ifeq: {{{inlineTheme|yes}}} | yes
 
| style="background-color:{{
 
| style="background-color:{{
 
#if: {{{inlineThemeBkgColor4|}}}
 
#if: {{{inlineThemeBkgColor4|}}}
Line 278: Line 278:
 
}};"
 
}};"
 
}}><!--
 
}}><!--
--><td style="text-align:right; font-weight:bold;"><!--
+
--><td class="IBleft" style="text-align:right; font-weight:bold;"><!--
 
-->Possible [[Loot]]:<!--
 
-->Possible [[Loot]]:<!--
 
--></td><!--
 
--></td><!--
--><td style="text-align:left;"><!--
+
--><td class="IBright" style="text-align:left;"><!--
 
-->{{PropVals
 
-->{{PropVals
 
|prop=Loot
 
|prop=Loot
Line 292: Line 292:
 
*** Skills ***
 
*** Skills ***
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|arts}}
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|arts}}
| <tr {{#ifeq: {{{inlineTheme|yes}}} | yes
+
| <tr class="IBsep" {{#ifeq: {{{inlineTheme|yes}}} | yes
 
| style="background-color:{{
 
| style="background-color:{{
 
#if: {{{inlineThemeBkgColor3|}}}
 
#if: {{{inlineThemeBkgColor3|}}}
Line 301: Line 301:
 
--><td colspan="2" style="padding:2px;"></td><!--
 
--><td colspan="2" style="padding:2px;"></td><!--
 
--></tr><!--
 
--></tr><!--
--><tr {{#ifeq: {{{inlineTheme|yes}}} | yes
+
--><tr class="IBinfo" {{#ifeq: {{{inlineTheme|yes}}} | yes
 
| style="background-color:{{
 
| style="background-color:{{
 
#if: {{{inlineThemeBkgColor4|}}}
 
#if: {{{inlineThemeBkgColor4|}}}
Line 308: Line 308:
 
}};"
 
}};"
 
}}><!--
 
}}><!--
--><td colspan="2" style="padding:0;">{{Infobox/List Skillvals|page={{{page|{{FULLPAGENAME}} }}} }}</td><!--
+
--><td class="IBboth" colspan="2" style="padding:0;">{{Infobox/List Skillvals|page={{{page|{{FULLPAGENAME}} }}} }}</td><!--
 
--></tr>
 
--></tr>
 
}}<!--
 
}}<!--
 
*** RequiredBy ***
 
*** RequiredBy ***
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|RequiredBy}}
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|RequiredBy}}
| <tr {{#ifeq: {{{inlineTheme|yes}}} | yes
+
| <tr class="IBsep" {{#ifeq: {{{inlineTheme|yes}}} | yes
 
| style="background-color:{{
 
| style="background-color:{{
 
#if: {{{inlineThemeBkgColor3|}}}
 
#if: {{{inlineThemeBkgColor3|}}}
Line 322: Line 322:
 
--><td colspan="2" style="padding:2px;"></td><!--
 
--><td colspan="2" style="padding:2px;"></td><!--
 
--></tr><!--
 
--></tr><!--
--><tr {{#ifeq: {{{inlineTheme|yes}}} | yes
+
--><tr class="IBinfo" {{#ifeq: {{{inlineTheme|yes}}} | yes
 
| style="background-color:{{
 
| style="background-color:{{
 
#if: {{{inlineThemeBkgColor4|}}}
 
#if: {{{inlineThemeBkgColor4|}}}
Line 329: Line 329:
 
}};"
 
}};"
 
}}><!--
 
}}><!--
--><td style="text-align:right; font-weight:bold;"><!--
+
--><td class="IBleft" style="text-align:right; font-weight:bold;"><!--
 
-->Required By:<!--
 
-->Required By:<!--
 
--></td><!--
 
--></td><!--
--><td style="text-align:left;"><!--
+
--><td class="IBright" style="text-align:left;"><!--
 
-->{{#ask:[[-RequiredBy::{{{page|{{FULLPAGENAME}} }}}]]
 
-->{{#ask:[[-RequiredBy::{{{page|{{FULLPAGENAME}} }}}]]
 
|format=ul
 
|format=ul
Line 344: Line 344:
 
}}<!--
 
}}<!--
 
*** FOOTER ***
 
*** FOOTER ***
--><tr {{#ifeq: {{{inlineTheme|yes}}} | yes
+
--><tr class="IBfooter" {{#ifeq: {{{inlineTheme|yes}}} | yes
 
| style="background-color:{{
 
| style="background-color:{{
 
#if: {{{inlineThemeBkgColor5|}}}
 
#if: {{{inlineThemeBkgColor5|}}}

Revision as of 03:28, 9 July 2012

Infobox
No image found, click to upload
Back to Objects



Template documentation (for the template shown above, sometimes hidden or invisible)

Description

This template is used to create an information-box to automatically display different kinds of info, depending on properties set on the page it is displaying this info for.
It relies on properties set using {{SetProp}}.
It uses Infobox/Stylesheet.css as CSS-Stylesheet, which is site-wide included.

Syntax

Type the below code at the top of the page, with values assigned to relevant parameters.
See {{SetProp}} for easy copy&paste code to use on pages.
{{SetProp
|...
}}{{Infobox}}

==About==
The possible named-parameters for {{Infobox}} are:
name description
nocat optional, auto-categorization will be inhibited when used with any non-empty value.
page optional, pagename of item to display info for.
Defaults to {{PAGENAME}} or {{FULLPAGENAME}} when appropriate.
catsort optional, sortkey of page inside category listings.
Defaults to {{PAGENAME}} or something different when appropriate depending on special cases.
See: Sort key

Examples

See the Help:Infobox or test-data pages.

Helper-templates


Visit Template:Infobox/doc to edit this text! (How does this work?)