Difference between revisions of "User:White In Sky/Template"

From Paradise Station Wiki
Jump to navigation Jump to search
(Undo revision 2913 by Ebonyuntruth (talk))
(final fixes, transferred from Template:Storage, other helper-templates will be removed, using a slight hack (extra <td>), minor cleanup of documentation)
Line 1: Line 1:
#if:{{{contents|}}}| {{Storage|name={{{name}}}|image={{{image}}}|bgcolor1={{{bgcolor1}}}|bgcolor2={{{bgcolor2}}}|foundin={{{foundin}}}|usedfor={{{usedfor}}}|strategy={{{strategy}}}|description={{{description}}}|contents={{{contents}}}}} | #if:{{{description|}}}| {{ItemMedium|name={{{name}}}|image={{{image}}}|bgcolor1={{{bgcolor1}}}|bgcolor2={{{bgcolor2}}}|foundin={{{foundin}}}|usedfor={{{usedfor}}}|strategy={{{strategy}}}|description={{{description}}}}} | #if:{{{name|}}}| {{Template:ItemSimple|name={{{name}}}|image={{{image}}}|bgcolor1={{{bgcolor1}}}|bgcolor2={{{bgcolor2}}}}} | <font color='red'>'''The item needs to have the name defined.'''</font> }} }} }}<noinclude>
{| style="border: 1px solid {{{bgcolor2|#bbbbbb}}};" {{#if:{{{foundin|}}}{{{usedfor|}}}{{{strategy|}}}|width="100%"|}} cellspacing="0" cellpadding="2"
| align="center" width="150" style="background-color: {{{bgcolor1|#cccccc}}};" {{#if:{{{foundin|}}}{{{usedfor|}}}{{{strategy|}}}|colspan=2|}} | [[File:{{{image|{{{name|NPA}}}.png}}}|64px]]<br />'''{{{name|Item}}}'''
{{#if:{{{foundin|}}}{{{usedfor|}}}{{{strategy|}}}|{{!}}|{{!}} style="padding: 0;" {{!}}}}
{{#if:{{{foundin|}}}|'''Found in:''' {{{foundin}}}<br />|}}{{#if:{{{usedfor|}}}|'''Used for:''' {{{usedfor}}}<br />|}}{{#if:{{{strategy|}}}|'''Strategy:''' {{{strategy}}}<br />|}}
{{#if:{{{description|}}}|{{!}}- align="center" style="background-color: {{{bgcolor2|#bbbbbb}}};"|}}
{{#if:{{{description|}}}|{{!}} colspan=2 {{!}} '''Description'''|}}
{{#if:{{{description|}}}|{{!}}- align="center" style="background-color: {{{bgcolor1|#cccccc}}};" valign="top"|}}
{{#if:{{{description|}}}|{{!}} colspan=2 {{!}} {{{description}}}|}}
{{#if:{{{contents|}}}|{{!}}- align="center" style="background-color: {{{bgcolor2|#bbbbbb}}};"|}}
{{#if:{{{contents|}}}|{{!}} colspan=2 {{!}} '''Contents'''|}}
{{#if:{{{contents|}}}|{{!}}- align="center" style="background-color: {{{bgcolor1|#cccccc}}};" valign="top"|}}
{{#if:{{{contents|}}}|{{!}} colspan=2  {{!}} {{{contents}}}|}}
|}<noinclude>


== How to use ==


template intended for lists of objects to clean them up a bit.
== Usage ==
This template is intended to help list item descriptions in a consistent fashion across articles.


=== With no parameters ===
=== With no parameters ===
  <nowiki>{{Item}}</nowiki>


  <nowiki>[[Template:Item]]</nowiki>
{{Item}}


[[Item]]
=== With minimal parameters ===
The bare minimum is with the <code>name</code> parameter:


=== With minimum parameters ===
  <nowiki>{{Item</nowiki>
  <nowiki>| name = Test Item</nowiki>
  <nowiki>| bgcolor1 = #FFEE88</nowiki>
  <nowiki>| bgcolor2 = #FFDD66</nowiki>
  <nowiki>| image = Redtoolbox.png</nowiki>
  <nowiki>}}</nowiki>


The bare minimum is the name parameter.
{{Item
| name = Test Item
| bgcolor1 = #FFEE88
| bgcolor2 = #FFDD66
| image = Btoolbox.png
}}


  <nowiki>[[Item</nowiki>
=== Typical item ===
  <nowiki>|name=Test Item</nowiki>
If the <code>description</code> parameter is set, this template will show:
  <nowiki>|bgcolor1 = #FFEE88</nowiki>
  <nowiki>|bgcolor2 = #FFDD66</nowiki>
  <nowiki>|image = Redtoolbox.png</nowiki>
  <nowiki>]]</nowiki>


[[Item
   <nowiki>{{Item</nowiki>
|name=Test Item
   <nowiki>| bgcolor1 = #FFEE88</nowiki>
|bgcolor1 = #FFEE88
   <nowiki>| bgcolor2 = #FFDD66</nowiki>
|bgcolor2 = #FFDD66
   <nowiki>| name = Emergency Toolbox</nowiki>
|image = Redtoolbox.png
   <nowiki>| image = Redtoolbox.png</nowiki>
]]
   <nowiki>| foundin = emergency lockers and storage areas</nowiki>
 
   <nowiki>| usedfor = Contains tools which are useful in emergencies</nowiki>
=== Normal item ===
   <nowiki>| strategy = It is very heavy, useful for the beating up of people. Contains a flashlight which is very useful as well as a crowbar.</nowiki>
 
   <nowiki>| description = The toolbox contains a flashlight, a crowbar, a radio and a fire extinguisher. All of which are very useful not only when emergencies hit but also when trying to cause an emergency.</nowiki>
If the description is set, this template will show.
 
   <nowiki>[[Item</nowiki>
   <nowiki>|bgcolor1 = #FFEE88</nowiki>
   <nowiki>|bgcolor2 = #FFDD66</nowiki>
   <nowiki>|name = Emergency Toolbox</nowiki>
   <nowiki>|image = Redtoolbox.png</nowiki>
   <nowiki>|foundin = emergency lockers and storage areas</nowiki>
   <nowiki>|usedfor = Contains tools which are useful in emergencies</nowiki>
   <nowiki>|strategy = It is very heavy, useful for the beating up of people. Contains a flashlight which is very useful as well as a crowbar.</nowiki>
   <nowiki>|description = The toolbox contains a flashlight, a crowbar, a radio and a fire extinguisher. All of which are very useful not only when emergencies hit but also when trying to cause an emergency.</nowiki>
 
   <nowiki>Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes.</nowiki>
   <nowiki>Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes.</nowiki>
   <nowiki>]]</nowiki>
   <nowiki>}}</nowiki>
 
[[Item
|bgcolor1 = #FFEE88
|bgcolor2 = #FFDD66
|name = Emergency Toolbox
|image = Redtoolbox.png
|foundin = emergency lockers and storage areas
|usedfor = Contains tools which are useful in emergencies
|strategy = It is very heavy, useful for the beating up of people. Contains a flashlight which is very useful as well as a crowbar.
|description = The toolbox contains a flashlight, a crowbar, a radio and a fire extinguisher. All of which are very useful not only when emergencies hit but also when trying to cause an emergency.


{{Item
| bgcolor1 = #FFEE88
| bgcolor2 = #FFDD66
| name = Emergency Toolbox
| image = Redtoolbox.png
| foundin = emergency lockers and storage areas
| usedfor = Contains tools which are useful in emergencies
| strategy = It is very heavy, useful for the beating up of people. Contains a flashlight which is very useful as well as a crowbar.
| description = The toolbox contains a flashlight, a crowbar, a radio and a fire extinguisher. All of which are very useful not only when emergencies hit but also when trying to cause an emergency.
Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes.
Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes.
]]
}}


=== Container items ===
=== Container items ===
If the <code>contents</code> parameter is set, this template will thow:


If the contents variable is set, this template will thow:
   <nowiki>{{Item</nowiki>
 
   <nowiki>| bgcolor1 = #FFEE88</nowiki>
   <nowiki>[[Item</nowiki>
   <nowiki>| bgcolor2 = #FFDD66</nowiki>
   <nowiki>|bgcolor1 = #FFEE88</nowiki>
   <nowiki>| name = Emergency Toolbox</nowiki>
   <nowiki>|bgcolor2 = #FFDD66</nowiki>
   <nowiki>| image = Redtoolbox.png</nowiki>
   <nowiki>|name = Emergency Toolbox</nowiki>
   <nowiki>| foundin = emergency lockers and storage areas</nowiki>
   <nowiki>|image = Redtoolbox.png</nowiki>
   <nowiki>| usedfor = Contains tools which are useful in emergencies</nowiki>
   <nowiki>|foundin = emergency lockers and storage areas</nowiki>
   <nowiki>| strategy = It is very heavy, useful for the beating up of people. Contains a flashlight which is very useful as well as a crowbar.</nowiki>
   <nowiki>|usedfor = Contains tools which are useful in emergencies</nowiki>
   <nowiki>| contents = [[File:Screwdriver tool.png|link=Screwdriver]] [[File:Wrench.png|link=Wrench]] [[File:Welder.png|link=Welding Tool]]<br> [[File:Crowbar.png|link=Crowbar]]  <nowiki>[[File:Analyzer.png|link=Analyzer]] [[File:Wirecutters.png|link=Wirecutters]] </nowiki>
   <nowiki>|strategy = It is very heavy, useful for the beating up of people. Contains a flashlight which is very useful as well as a crowbar.</nowiki>
   <nowiki>| description = The toolbox contains a flashlight, a crowbar, a radio and a fire extinguisher. All of which are very useful not only when emergencies hit but also when  <nowiki>trying to cause an emergency.</nowiki>
   <nowiki>|contents = [[File:Screwdriver tool.png|link=Screwdriver]] [[File:Wrench.png|link=Wrench]] [[File:Welder.png|link=Welding Tool]]<br> [[File:Crowbar.png|link=Crowbar]]  <nowiki>[[File:Analyzer.png|link=Analyzer]] [[File:Wirecutters.png|link=Wirecutters]] </nowiki>
   <nowiki>|description = The toolbox contains a flashlight, a crowbar, a radio and a fire extinguisher. All of which are very useful not only when emergencies hit but also when  <nowiki>trying to cause an emergency.</nowiki>
 
   <nowiki>Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes.</nowiki>
   <nowiki>Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes.</nowiki>
   <nowiki>]]</nowiki>
   <nowiki>}}</nowiki>


[[Item
{{Item
|bgcolor1 = #FFEE88
| bgcolor1 = #FFEE88
|bgcolor2 = #FFDD66
| bgcolor2 = #FFDD66
|name = Emergency Toolbox
| name = Emergency Toolbox
|image = Redtoolbox.png
| image = Redtoolbox.png
|foundin = emergency lockers and storage areas
| foundin = emergency lockers and storage areas
|usedfor = Contains tools which are useful in emergencies
| usedfor = Contains tools which are useful in emergencies
|strategy = It is very heavy, useful for the beating up of people. Contains a flashlight which is very useful as well as a crowbar.
| strategy = It is very heavy, useful for the beating up of people. Contains a flashlight which is very useful as well as a crowbar.
|contents = [[File:Screwdriver tool.png|link=Screwdriver]] [[File:Wrench.png|link=Wrench]] [[File:Welderon.gif|link=Welding Tool]]<br> [[File:Crowbar.png|link=Crowbar]] [[File:Analyzer.png|link=Analyzer]] [[File:Wirecutters.png|link=Wirecutters]]  
| contents = [[File:Screwdriver tool.png|link=Screwdriver]] [[File:Wrench.png|link=Wrench]] [[File:Welderon.gif|link=Welding Tool]]<br> [[File:Crowbar.png|link=Crowbar]] [[File:Analyzer.png|link=Analyzer]] [[File:Wirecutters.png|link=Wirecutters]]  
|description = The toolbox contains a flashlight, a crowbar, a radio and a fire extinguisher. All of which are very useful not only when emergencies hit but also when trying to cause an emergency.
| description = The toolbox contains a flashlight, a crowbar, a radio and a fire extinguisher. All of which are very useful not only when emergencies hit but also when trying to cause an emergency.
Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes.
}}


Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes.
]]
[[Category:Templates]]
[[Category:Templates]]
</noinclude>
</noinclude>

Revision as of 21:13, 30 October 2014

NPA.png
Item






Usage

This template is intended to help list item descriptions in a consistent fashion across articles.

With no parameters

 {{Item}}
NPA.png
Item





With minimal parameters

The bare minimum is with the name parameter:

 {{Item
 | name = Test Item
 | bgcolor1 = #FFEE88
 | bgcolor2 = #FFDD66
 | image = Redtoolbox.png
 }}
File:Btoolbox.png
Test Item





Typical item

If the description parameter is set, this template will show:

 {{Item
 | bgcolor1 = #FFEE88
 | bgcolor2 = #FFDD66
 | name = Emergency Toolbox
 | image = Redtoolbox.png
 | foundin = emergency lockers and storage areas
 | usedfor = Contains tools which are useful in emergencies
 | strategy = It is very heavy, useful for the beating up of people. Contains a flashlight which is very useful as well as a crowbar.
 | description = The toolbox contains a flashlight, a crowbar, a radio and a fire extinguisher. All of which are very useful not only when emergencies hit but also when trying to cause an emergency.
 Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes.
 }}
File:Redtoolbox.png
Emergency Toolbox

Found in: emergency lockers and storage areas
Used for: Contains tools which are useful in emergencies
Strategy: It is very heavy, useful for the beating up of people. Contains a flashlight which is very useful as well as a crowbar.

Description
The toolbox contains a flashlight, a crowbar, a radio and a fire extinguisher. All of which are very useful not only when emergencies hit but also when trying to cause an emergency.

Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes.



Container items

If the contents parameter is set, this template will thow:

 {{Item
 | bgcolor1 = #FFEE88
 | bgcolor2 = #FFDD66
 | name = Emergency Toolbox
 | image = Redtoolbox.png
 | foundin = emergency lockers and storage areas
 | usedfor = Contains tools which are useful in emergencies
 | strategy = It is very heavy, useful for the beating up of people. Contains a flashlight which is very useful as well as a crowbar.
 | contents = [[File:Screwdriver tool.png|link=Screwdriver]] [[File:Wrench.png|link=Wrench]] [[File:Welder.png|link=Welding Tool]]<br> [[File:Crowbar.png|link=Crowbar]]   <nowiki>[[File:Analyzer.png|link=Analyzer]] [[File:Wirecutters.png|link=Wirecutters]] 
 | description = The toolbox contains a flashlight, a crowbar, a radio and a fire extinguisher. All of which are very useful not only when emergencies hit but also when   <nowiki>trying to cause an emergency.
 Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes.
 }}
File:Redtoolbox.png
Emergency Toolbox

Found in: emergency lockers and storage areas
Used for: Contains tools which are useful in emergencies
Strategy: It is very heavy, useful for the beating up of people. Contains a flashlight which is very useful as well as a crowbar.

Description
The toolbox contains a flashlight, a crowbar, a radio and a fire extinguisher. All of which are very useful not only when emergencies hit but also when trying to cause an emergency.

Be quick in getting one as they tend to get looted quickly if you want until an emergency strikes.

Contents
Screwdriver tool.png Wrench.png Welderon.gif
Crowbar.png Analyzer.png Wirecutters.png