Difference between revisions of "Template:Infobox"
From Salem Wiki
m (Added separator for 'Loot') |
m |
||
(16 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<onlyinclude>__SHOWFACTBOX__<!-- | <onlyinclude>__SHOWFACTBOX__<!-- | ||
-->{{#set:isGameMenu=n}}<!-- | -->{{#set:isGameMenu=n}}<!-- | ||
− | --><table border="0" cellspacing="1px" cellpadding="5px" frame="box" class="Infobox" | + | --><table border="0" cellspacing="1px" cellpadding="5px" frame="box" class="Infobox"><!-- |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
*** HEADER *** | *** HEADER *** | ||
− | --><tr | + | --><tr class="IBheader"><!-- |
− | + | --><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><!-- | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | --><th colspan="2" | ||
− | |||
− | |||
− | |||
− | --><div | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
--></th><!-- | --></th><!-- | ||
--></tr><!-- | --></tr><!-- | ||
*** BODY *** | *** BODY *** | ||
*** IMAGE's + CAPTION *** | *** IMAGE's + CAPTION *** | ||
− | --><tr | + | --><tr class="IBintro"><!-- |
− | + | --><td colspan="2"><!-- | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | --><td colspan="2" | ||
− | |||
− | |||
*** ICON *** | *** ICON *** | ||
-->{{PropVals/getIcon|{{{page|{{FULLPAGENAME}} }}} }}<!-- | -->{{PropVals/getIcon|{{{page|{{FULLPAGENAME}} }}} }}<!-- | ||
*** CAPTION *** | *** CAPTION *** | ||
− | -->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|Caption}} | + | --><div class="IBcaption">{{ |
− | + | #if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|Caption}} | |
− | + | | “{{#show: {{{page|{{FULLPAGENAME}} }}} |?Caption}}” | |
− | + | }}</div><!-- | |
− | }}<!-- | ||
*** FULLVIEW **** | *** FULLVIEW **** | ||
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|Has fullview}} | -->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|Has fullview}} | ||
− | | | + | | [[{{ #ifexist: {{ |
#show: {{{page|{{FULLPAGENAME}} }}} | #show: {{{page|{{FULLPAGENAME}} }}} | ||
|?Has fullview | |?Has fullview | ||
Line 85: | Line 43: | ||
*** RequiresTech *** | *** RequiresTech *** | ||
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|RequiresTech}} | -->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|RequiresTech}} | ||
− | | <tr | + | | <tr class="IBinfo"><!-- |
− | + | --><td class="IBleft"><!-- | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | --><td | ||
-->[[:Category:Skills|Technology]] Required:<!-- | -->[[:Category:Skills|Technology]] Required:<!-- | ||
--></td><!-- | --></td><!-- | ||
− | --><td | + | --><td class="IBright"><!-- |
-->{{PropVals | -->{{PropVals | ||
|prop=RequiresTech | |prop=RequiresTech | ||
Line 105: | Line 57: | ||
*** UnlocksTech *** | *** UnlocksTech *** | ||
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|UnlocksTech}} | -->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|UnlocksTech}} | ||
− | | <tr | + | | <tr class="IBinfo"><!-- |
− | + | --><td class="IBleft"><!-- | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | --><td | ||
-->[[:Category:Skills|Technology]] Unlocked:<!-- | -->[[:Category:Skills|Technology]] Unlocked:<!-- | ||
--></td><!-- | --></td><!-- | ||
− | --><td | + | --><td class="IBright"><!-- |
-->{{PropVals | -->{{PropVals | ||
|prop=UnlocksTech | |prop=UnlocksTech | ||
Line 125: | Line 71: | ||
*** RequiresObj *** | *** RequiresObj *** | ||
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|RequiresObj}} | -->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|RequiresObj}} | ||
− | | <tr | + | | <tr class="IBinfo"><!-- |
− | + | --><td class="IBleft">[[:Category:Objects|Object(s)]] Required:</td><!-- | |
− | + | --><td class="IBright"><!-- | |
− | |||
− | |||
− | |||
− | |||
− | --><td | ||
− | |||
− | |||
− | --><td | ||
-->{{PropVals | -->{{PropVals | ||
|prop=RequiresObj | |prop=RequiresObj | ||
Line 146: | Line 84: | ||
*** RepairedWith *** | *** RepairedWith *** | ||
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|RepairedWith}} | -->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|RepairedWith}} | ||
− | | <tr | + | | <tr class="IBinfo"><!-- |
− | + | --><td class="IBleft">Repaired With:</td><!-- | |
− | + | --><td class="IBright"><!-- | |
− | |||
− | |||
− | |||
− | |||
− | --><td | ||
− | |||
− | |||
− | --><td | ||
-->{{PropVals | -->{{PropVals | ||
|prop=RepairedWith | |prop=RepairedWith | ||
|page={{{page|{{FULLPAGENAME}} }}} | |page={{{page|{{FULLPAGENAME}} }}} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
}}<!-- | }}<!-- | ||
--></td><!-- | --></td><!-- | ||
Line 189: | 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 | + | | <tr class="IBsep"><!-- |
− | + | --><td colspan="2"></td><!-- | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | --><td colspan="2 | ||
--></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 | + | | <tr class="IBinfo"><!-- |
− | + | --><td class="IBleft">Liftable?</td><!-- | |
− | + | --><td class="IBrightC"><!-- | |
− | |||
− | |||
− | |||
− | |||
− | --><td | ||
− | |||
− | |||
− | --><td | ||
-->{{#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 220: | Line 113: | ||
| No | | No | ||
}} | }} | ||
+ | }}<!-- | ||
+ | --></td><!-- | ||
+ | --></tr> | ||
+ | }}<!-- | ||
+ | *** Locations *** | ||
+ | -->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|Locations}} | ||
+ | | <tr class="IBinfo"><!-- | ||
+ | --><td class="IBleft">[[Terrain|Location]]s found:</td><!-- | ||
+ | --><td class="IBright"><!-- | ||
+ | -->{{List Locations | ||
+ | |page={{{page|{{FULLPAGENAME}} }}} | ||
}}<!-- | }}<!-- | ||
--></td><!-- | --></td><!-- | ||
Line 226: | Line 130: | ||
*** HP *** | *** HP *** | ||
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|HP}} | -->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|HP}} | ||
− | | <tr | + | | <tr class="IBinfo"><!-- |
− | + | --><td class="IBleft">[[Structure Damage|Hit Points]]:</td><!-- | |
− | + | --><td class="IBrightC"><!-- | |
− | |||
− | |||
− | |||
− | |||
− | --><td | ||
− | |||
− | |||
− | --><td | ||
-->{{#ifeq: 0 | {{#show: {{{page|{{FULLPAGENAME}} }}} |?HP |link=none}} | -->{{#ifeq: 0 | {{#show: {{{page|{{FULLPAGENAME}} }}} |?HP |link=none}} | ||
| Still unknown | | Still unknown | ||
Line 246: | Line 142: | ||
*** Soak *** | *** Soak *** | ||
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|Soak}} | -->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|Soak}} | ||
− | | <tr | + | | <tr class="IBinfo"><!-- |
− | + | --><td class="IBleft">[[Soak]] Value:</td><!-- | |
− | + | --><td class="IBrightC"><!-- | |
− | |||
− | |||
− | |||
− | |||
− | --><td | ||
− | |||
− | |||
− | --><td | ||
-->{{#ifeq: 0 | {{#show: {{{page|{{FULLPAGENAME}} }}} |?Soak |link=none}} | -->{{#ifeq: 0 | {{#show: {{{page|{{FULLPAGENAME}} }}} |?Soak |link=none}} | ||
| Still unknown | | Still unknown | ||
Line 266: | Line 154: | ||
*** Loot *** | *** Loot *** | ||
-->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|Loot}} | -->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|Loot}} | ||
− | | <tr | + | | <tr class="IBsep"><!-- |
− | + | --><td colspan="2"></td><!-- | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | --><td colspan="2 | ||
--></tr><!-- | --></tr><!-- | ||
− | --><tr | + | --><tr class="IBinfo"><!-- |
− | + | --><td class="IBleft">Possible [[Loot]]:</td><!-- | |
− | + | --><td class="IBright"><!-- | |
− | |||
− | |||
− | |||
− | |||
− | --><td | ||
− | |||
− | |||
− | --><td | ||
-->{{PropVals | -->{{PropVals | ||
|prop=Loot | |prop=Loot | ||
Line 292: | Line 166: | ||
}}<!-- | }}<!-- | ||
--></td><!-- | --></td><!-- | ||
+ | --></tr> | ||
+ | }}<!-- | ||
+ | *** Alchemy *** | ||
+ | -->{{#if: {{#show:{{{page|{{FULLPAGENAME}} }}} | ||
+ | |?hebl|?heph|?heyb|?hebb | ||
+ | |?sabl|?saph|?sayb|?sabb | ||
+ | |?mebl|?meph|?meyb|?mebb | ||
+ | |?subl|?suph|?suyb|?subb | ||
+ | |?lebl|?leph|?leyb|?lebb | ||
+ | |link=none|format=list | ||
+ | }} | ||
+ | | <tr class="IBsep"><!-- | ||
+ | --><td colspan="2"></td><!-- | ||
+ | --></tr><!-- | ||
+ | --><tr class="IBinfo"><!-- | ||
+ | --><td class="IBboth" colspan="2">{{Infobox/List newAlchemy|page={{{page|{{FULLPAGENAME}} }}} }}</td><!-- | ||
+ | --></tr> | ||
+ | }}<!-- | ||
+ | *** Skills *** | ||
+ | -->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|arts}} | ||
+ | | <tr class="IBsep"><!-- | ||
+ | --><td colspan="2"></td><!-- | ||
+ | --></tr><!-- | ||
+ | --><tr class="IBinfo"><!-- | ||
+ | --><td class="IBboth" colspan="2">{{Infobox/List Skillvals|page={{{page|{{FULLPAGENAME}} }}} }}</td><!-- | ||
+ | --></tr> | ||
+ | }}<!-- | ||
+ | *** RequiredBy *** | ||
+ | -->{{#if: {{HasProp|page={{{page|{{FULLPAGENAME}} }}}|RequiredBy}} | ||
+ | | <tr class="IBsep"><!-- | ||
+ | --><td colspan="2"></td><!-- | ||
+ | --></tr><!-- | ||
+ | --><tr class="IBinfo"><!-- | ||
+ | --><td class="IBboth" colspan="2">{{Infobox/List RequiredBys|page={{{page|{{FULLPAGENAME}} }}} |collapsed=y |limit=50 }}</td><!-- | ||
--></tr> | --></tr> | ||
}}<!-- | }}<!-- | ||
*** FOOTER *** | *** FOOTER *** | ||
− | --><tr | + | --><tr class="IBfooter"><!-- |
− | + | --><th colspan="2"><!-- | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | --><th colspan="2" | ||
− | |||
− | |||
-->Back to <!-- | -->Back to <!-- | ||
*** Only display links to GameMenu when in a menu. *** | *** Only display links to GameMenu when in a menu. *** | ||
Line 377: | 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
Infobox | |
---|---|
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==
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. |
Examples
- See the Help:Infobox or test-data pages.
Helper-templates
- {{SetProp}}
- {{HasProp}}
- {{PropVals}}
- {{PropVals/getIcon}} to display icon at top.
- {{PropVals/Print Entry}} to display icons with name links.
- {{List Locations}} to display Locations info.
- {{Infobox/List Skillvals}} to display Skill values.
- {{Infobox/List RequiredBys}} to display RequiredBy's.
Visit Template:Infobox/doc to edit this text! (How does this work?)