Difference between revisions of "Template:Infobox"

From Salem Wiki
Jump to: navigation, search
m (Adding Alchemy values)
m
 
(6 intermediate revisions by 2 users not shown)
Line 5: Line 5:
 
--><tr class="IBheader"><!--
 
--><tr class="IBheader"><!--
 
--><th colspan="2"><!--
 
--><th colspan="2"><!--
 +
-->[[Image:Unknown Item icon.png|12px|right|link=Help:Infobox|<span style="cursor:help;">Help on usage of this Infobox</span>]]<!--
 
--><div>{{#titleparts:{{{page|{{PAGENAME}} }}} ||-1}}</div><!--
 
--><div>{{#titleparts:{{{page|{{PAGENAME}} }}} ||-1}}</div><!--
 
--></th><!--
 
--></th><!--
Line 70: Line 71:
 
*** RequiresObj ***
 
*** RequiresObj ***
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|RequiresObj}}
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|RequiresObj}}
| <tr class="IBinfo" {{#ifeq: {{{inlineTheme|yes}}} | yes
+
| <tr class="IBinfo"><!--
| style="background-color:{{
+
--><td class="IBleft">[[:Category:Objects|Object(s)]] Required:</td><!--
#if: {{{inlineThemeBkgColor4|}}}
+
--><td class="IBright"><!--
| {{{inlineThemeBkgColor4}}}
 
| #8fa3cc
 
}};"
 
}}><!--
 
--><td class="IBleft" style="text-align:right; font-weight:bold;"><!--
 
-->[[:Category:Objects|Object(s)]] Required:<!--
 
--></td><!--
 
--><td class="IBright" style="text-align:left;"><!--
 
 
-->{{PropVals
 
-->{{PropVals
 
|prop=RequiresObj
 
|prop=RequiresObj
Line 91: Line 84:
 
*** RepairedWith ***
 
*** RepairedWith ***
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|RepairedWith}}
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|RepairedWith}}
| <tr class="IBinfo" {{#ifeq: {{{inlineTheme|yes}}} | yes
+
| <tr class="IBinfo"><!--
| style="background-color:{{
+
--><td class="IBleft">Repaired With:</td><!--
#if: {{{inlineThemeBkgColor4|}}}
+
--><td class="IBright"><!--
| {{{inlineThemeBkgColor4}}}
 
| #8fa3cc
 
}};"
 
}}><!--
 
--><td class="IBleft" style="text-align:right; font-weight:bold;"><!--
 
-->Repaired With:<!--
 
--></td><!--
 
--><td class="IBright" style="text-align:left;"><!--
 
 
-->{{PropVals
 
-->{{PropVals
 
|prop=RepairedWith
 
|prop=RepairedWith
Line 111: Line 96:
 
*** 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 class="IBsep" {{#ifeq: {{{inlineTheme|yes}}} | yes
+
| <tr class="IBsep"><!--
| style="background-color:{{
+
--><td colspan="2"></td><!--
#if: {{{inlineThemeBkgColor3|}}}
 
| {{{inlineThemeBkgColor3}}}
 
| #527acc
 
}};"
 
}}><!--
 
--><td colspan="2" style="padding:2px;"></td><!--
 
 
--></tr>
 
--></tr>
 
}}<!--
 
}}<!--
 
*** 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 class="IBinfo" {{#ifeq: {{{inlineTheme|yes}}} | yes
+
| <tr class="IBinfo"><!--
| style="background-color:{{
+
--><td class="IBleft">Liftable?</td><!--
#if: {{{inlineThemeBkgColor4|}}}
+
--><td class="IBrightC"><!--
| {{{inlineThemeBkgColor4}}}
 
| #8fa3cc
 
}};"
 
}}><!--
 
--><td class="IBleft" style="text-align:right; font-weight:bold;"><!--
 
-->Liftable?<!--
 
--></td><!--
 
--><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 148: Line 119:
 
*** Locations ***
 
*** Locations ***
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|Locations}}
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|Locations}}
| <tr class="IBinfo" {{#ifeq: {{{inlineTheme|yes}}} | yes
+
| <tr class="IBinfo"><!--
| style="background-color:{{
+
--><td class="IBleft">[[Terrain|Location]]s found:</td><!--
#if: {{{inlineThemeBkgColor4|}}}
+
--><td class="IBright"><!--
| {{{inlineThemeBkgColor4}}}
 
| #8fa3cc
 
}};"
 
}}><!--
 
--><td class="IBleft" style="text-align:right; font-weight:bold;"><!--
 
-->[[Terrain|Location]]s found:<!--
 
--></td><!--
 
--><td class="IBright" style="text-align:left;"><!--
 
 
-->{{List Locations
 
-->{{List Locations
 
|page={{{page|{{FULLPAGENAME}} }}}
 
|page={{{page|{{FULLPAGENAME}} }}}
Line 167: Line 130:
 
*** HP ***
 
*** HP ***
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|HP}}
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|HP}}
| <tr class="IBinfo" {{#ifeq: {{{inlineTheme|yes}}} | yes
+
| <tr class="IBinfo"><!--
| style="background-color:{{
+
--><td class="IBleft">[[Structure Damage|Hit Points]]:</td><!--
#if: {{{inlineThemeBkgColor4|}}}
+
--><td class="IBrightC"><!--
| {{{inlineThemeBkgColor4}}}
 
| #8fa3cc
 
}};"
 
}}><!--
 
--><td class="IBleft" style="text-align:right; font-weight:bold;"><!--
 
-->[[Structure Damage|Hit Points]]:<!--
 
--></td><!--
 
--><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 187: Line 142:
 
*** Soak ***
 
*** Soak ***
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|Soak}}
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|Soak}}
| <tr class="IBinfo" {{#ifeq: {{{inlineTheme|yes}}} | yes
+
| <tr class="IBinfo"><!--
| style="background-color:{{
+
--><td class="IBleft">[[Soak]] Value:</td><!--
#if: {{{inlineThemeBkgColor4|}}}
+
--><td class="IBrightC"><!--
| {{{inlineThemeBkgColor4}}}
 
| #8fa3cc
 
}};"
 
}}><!--
 
--><td class="IBleft" style="text-align:right; font-weight:bold;"><!--
 
-->[[Soak]] Value:<!--
 
--></td><!--
 
--><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 207: Line 154:
 
*** Loot ***
 
*** Loot ***
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|Loot}}
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|Loot}}
| <tr class="IBsep" {{#ifeq: {{{inlineTheme|yes}}} | yes
+
| <tr class="IBsep"><!--
| style="background-color:{{
+
--><td colspan="2"></td><!--
#if: {{{inlineThemeBkgColor3|}}}
 
| {{{inlineThemeBkgColor3}}}
 
| #527acc
 
}};"
 
}}><!--
 
--><td colspan="2" style="padding:2px;"></td><!--
 
 
--></tr><!--
 
--></tr><!--
--><tr class="IBinfo" {{#ifeq: {{{inlineTheme|yes}}} | yes
+
--><tr class="IBinfo"><!--
| style="background-color:{{
+
--><td class="IBleft">Possible [[Loot]]:</td><!--
#if: {{{inlineThemeBkgColor4|}}}
+
--><td class="IBright"><!--
| {{{inlineThemeBkgColor4}}}
 
| #8fa3cc
 
}};"
 
}}><!--
 
--><td class="IBleft" style="text-align:right; font-weight:bold;"><!--
 
-->Possible [[Loot]]:<!--
 
--></td><!--
 
--><td class="IBright" style="text-align:left;"><!--
 
 
-->{{PropVals
 
-->{{PropVals
 
|prop=Loot
 
|prop=Loot
Line 244: Line 177:
 
|link=none|format=list
 
|link=none|format=list
 
}}
 
}}
| <tr class="IBsep" {{#ifeq: {{{inlineTheme|yes}}} | yes
+
| <tr class="IBsep"><!--
| style="background-color:{{
+
--><td colspan="2"></td><!--
#if: {{{inlineThemeBkgColor3|}}}
 
| {{{inlineThemeBkgColor3}}}
 
| #527acc
 
}};"
 
}}><!--
 
--><td colspan="2" style="padding:2px;"></td><!--
 
 
--></tr><!--
 
--></tr><!--
--><tr class="IBinfo" {{#ifeq: {{{inlineTheme|yes}}} | yes
+
--><tr class="IBinfo"><!--
| style="background-color:{{
+
--><td class="IBboth" colspan="2">{{Infobox/List newAlchemy|page={{{page|{{FULLPAGENAME}} }}} }}</td><!--
#if: {{{inlineThemeBkgColor4|}}}
 
| {{{inlineThemeBkgColor4}}}
 
| #8fa3cc
 
}};"
 
}}><!--
 
--><td class="IBboth" colspan="2" style="padding:0;">{{Infobox/List AlchemyVals|page={{{page|{{FULLPAGENAME}} }}} }}</td><!--
 
 
--></tr>
 
--></tr>
 
}}<!--
 
}}<!--
 
*** Skills ***
 
*** Skills ***
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|arts}}
 
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|arts}}
| <tr class="IBsep" {{#ifeq: {{{inlineTheme|yes}}} | yes
+
| <tr class="IBsep"><!--
| style="background-color:{{
+
--><td colspan="2"></td><!--
#if: {{{inlineThemeBkgColor3|}}}
 
| {{{inlineThemeBkgColor3}}}
 
| #527acc
 
}};"
 
}}><!--
 
--><td colspan="2" style="padding:2px;"></td><!--
 
 
--></tr><!--
 
--></tr><!--
--><tr class="IBinfo" {{#ifeq: {{{inlineTheme|yes}}} | yes
+
--><tr class="IBinfo"><!--
| style="background-color:{{
+
--><td class="IBboth" colspan="2">{{Infobox/List Skillvals|page={{{page|{{FULLPAGENAME}} }}} }}</td><!--
#if: {{{inlineThemeBkgColor4|}}}
 
| {{{inlineThemeBkgColor4}}}
 
| #8fa3cc
 
}};"
 
}}><!--
 
--><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 class="IBsep" {{#ifeq: {{{inlineTheme|yes}}} | yes
+
| <tr class="IBsep"><!--
| style="background-color:{{
+
--><td colspan="2"></td><!--
#if: {{{inlineThemeBkgColor3|}}}
 
| {{{inlineThemeBkgColor3}}}
 
| #527acc
 
}};"
 
}}><!--
 
--><td colspan="2" style="padding:2px;"></td><!--
 
 
--></tr><!--
 
--></tr><!--
--><tr class="IBinfo" {{#ifeq: {{{inlineTheme|yes}}} | yes
+
--><tr class="IBinfo"><!--
| style="background-color:{{
+
--><td class="IBboth" colspan="2">{{Infobox/List RequiredBys|page={{{page|{{FULLPAGENAME}} }}} |collapsed=y |limit=50 }}</td><!--
#if: {{{inlineThemeBkgColor4|}}}
 
| {{{inlineThemeBkgColor4}}}
 
| #8fa3cc
 
}};"
 
}}><!--
 
--><td class="IBleft" style="text-align:right; font-weight:bold;"><!--
 
-->Required By:<!--
 
--></td><!--
 
--><td class="IBright" style="text-align:left;"><!--
 
-->{{#ask:[[-RequiredBy::{{{page|{{FULLPAGENAME}} }}}]]
 
|format=ul
 
|limit=10
 
|link=none
 
|template=PropVals/Print Entry
 
|userparam=no
 
}}<!--
 
--></td><!--
 
 
--></tr>
 
--></tr>
 
}}<!--
 
}}<!--
 
*** FOOTER ***
 
*** FOOTER ***
--><tr class="IBfooter" {{#ifeq: {{{inlineTheme|yes}}} | yes
+
--><tr class="IBfooter"><!--
| style="background-color:{{
+
--><th colspan="2"><!--
#if: {{{inlineThemeBkgColor5|}}}
 
| {{{inlineThemeBkgColor5}}}
 
| #aaaaaa
 
}};"
 
}}><!--
 
--><th colspan="2" {{#ifeq: {{{inlineTheme|yes}}} | yes
 
| style=""
 
}}><!--
 
 
-->Back to&nbsp;<!--
 
-->Back to&nbsp;<!--
 
*** Only display links to GameMenu when in a menu. ***
 
*** Only display links to GameMenu when in a menu. ***
Line 399: Line 277:
 
| no
 
| no
 
}}
 
}}
| [[Category:Objects|Objects]]
+
| [[Category:Objects|{{#if: {{{catsort|}}}
 +
| {{{catsort}}}
 +
| Objects
 +
}}]]
 
| [[Category:{{#show: {{{page|{{FULLPAGENAME}} }}}
 
| [[Category:{{#show: {{{page|{{FULLPAGENAME}} }}}
 
|?IsinGameMenu
 
|?IsinGameMenu
 
|link=none
 
|link=none
}}{{!}}{{PAGENAME}}]]
+
}}{{!}}{{#if: {{{catsort|}}}
 +
| {{{catsort}}}
 +
| {{PAGENAME}}
 +
}}]]
 
}}<!--
 
}}<!--
 
-->}}</includeonly><!--
 
-->}}</includeonly><!--
 
--></onlyinclude><noinclude>{{-}}{{documentation}}</noinclude>
 
--></onlyinclude><noinclude>{{-}}{{documentation}}</noinclude>

Latest revision as of 19:28, 13 August 2012

Help on usage of this Infobox
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?)