Template:Infobox object: Difference between revisions

From The Sims Wiki, a collaborative database for The Sims series
Jump to navigation Jump to search
Content added Content deleted
sims>LostInRiverview
m (adding extra parameter to Template:GetObjectCats to search for game name when determining buyability)
(Simplify categorization scheme; add support for CC namespace)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<!---*****OVERALL DESIGN CODE*****--->
<templatestyles src="Metainfobox/styles.css" /><!---*****OVERALL DESIGN CODE*****--->
{| class="metainfobox {{lc: {{MGL | {{vgcode | {{#if:{{{basegame|}}}|{{{basegame}}}|{{{game<includeonly>|</includeonly>}}} }} }} }} }}" cellpadding="1.5"
{| class="metainfobox {{lc: {{MGL | {{vgcode | {{#if:{{{basegame|}}}|{{{basegame}}}|{{{game<includeonly>|</includeonly>}}} }} }} }} }}" cellpadding="1.5"
! class="metainfobox-header large {{lc: {{MGL | {{vgcode | {{#if:{{{basegame|}}}|{{{basegame}}}|{{{game<includeonly>|</includeonly>}}} }} }} }} }}" colspan="2"{{!}}{{{name|{{PAGENAME}}}}}
! class="metainfobox-header large {{lc: {{MGL | {{vgcode | {{#if:{{{basegame|}}}|{{{basegame}}}|{{{game<includeonly>|</includeonly>}}} }} }} }} }}" colspan="2"{{!}}{{{name|{{PAGENAME}}}}}
Line 44: Line 44:
{{!}}-
{{!}}-
}}
}}
{{#if: {{{type1<includeonly>|</includeonly>}}} |
{{#if: {{{type|{{{type1<includeonly>|</includeonly>}}} }}} |
{{!}} rowspan="{{#expr: 1+{{#if:{{{type2<includeonly>|</includeonly>}}}|1|0}}+{{#if:{{{type3<includeonly>|</includeonly>}}}|1|0}}+{{#if:{{{type4<includeonly>|</includeonly>}}}|1|0}}+{{#if:{{{type5<includeonly>|</includeonly>}}}|1|0}} }}" {{!}} Object type(s)
{{!}} rowspan="{{#expr: 1+{{#if:{{{type2<includeonly>|</includeonly>}}}|1|0}}+{{#if:{{{type3<includeonly>|</includeonly>}}}|1|0}}+{{#if:{{{type4<includeonly>|</includeonly>}}}|1|0}}+{{#if:{{{type5<includeonly>|</includeonly>}}}|1|0}} }}" {{!}} Object type(s)
{{!}} {{{type1}}}
{{!}} {{{type|{{{type1}}} }}}
{{!}}-
{{!}}-
}}
}}
Line 81: Line 81:
}}
}}
|}
|}
<includeonly>{{#ifeq: {{lc:{{{cat}}}}}|n| |{{#ifeq: {{lc:{{{cat}}}}}|no| |{{#ifeq:{{NAMESPACE}}| |[[Category:Objects]]
<includeonly>{{#ifeq: {{Yesno-yes|{{{cat}}}|no=no}}|no| <!-- Don't add categories --> |
{{Namespace detect
{{GetObjectCats|game|{{{game}}}}}{{GetObjectCats|type|{{{type}}}}}{{GetObjectCats|type|{{{type1}}}}}{{GetObjectCats|type|{{{type2}}}}}{{GetObjectCats|type|{{{type3}}}}}{{GetObjectCats|type|{{{type4}}}}}{{GetObjectCats|type|{{{type5}}}}}{{GetObjectCats|buy|{{{buy}}}|{{{game}}}}}
|main = [[Category:Objects]] {{GetObjectCats|game|{{{game}}}}}{{GetObjectCats|type|{{{type}}}}}{{GetObjectCats|type|{{{type1}}}}}{{GetObjectCats|type|{{{type2}}}}}{{GetObjectCats|type|{{{type3}}}}}{{GetObjectCats|type|{{{type4}}}}}{{GetObjectCats|type|{{{type5}}}}}{{GetObjectCats|buy|{{{buy}}}|{{{game}}}}}
|<!-- Not in Main namespace -->}}}}}}</includeonly><noinclude>[[Category:Metainfobox templates|Object]]{{Documentation}}
|custom = [[Category:Objects (custom)]] {{GetObjectCats|game|{{{game}}}}}{{GetObjectCats|type|{{{type}}}}}{{GetObjectCats|type|{{{type1}}}}}{{GetObjectCats|type|{{{type2}}}}}{{GetObjectCats|type|{{{type3}}}}}{{GetObjectCats|type|{{{type4}}}}}{{GetObjectCats|type|{{{type5}}}}}{{GetObjectCats|buy|{{{buy}}}|{{{game}}}}}
}}
}}</includeonly><noinclude>{{clr}}{{Documentation}}
</noinclude>
</noinclude>

Latest revision as of 20:24, 19 August 2019

Infobox object
{{{image}}}
{{{caption}}}
Game {{{game}}}
Buyability {{{buy}}}
Price in game {{{price}}}
Selling price {{{sell}}}
Object type(s) {{{type1}}}
{{{type2}}}
{{{type3}}}
{{{type4}}}
{{{type5}}}
Size {{{size}}}
Number of uses {{{uses}}}
Badge required {{{badge}}}
Template documentation (View · Edit · History · Purge)

Description

Infobox for objects. Uses {{GetObjectCats}}.

Syntax

{{Infobox object|<...>}}

Copy and paste the information below into an Object's page and then add the information after the "=" with the information of the object.

{{Infobox object
|name       = 
|desc       = 
|image      = 
|game       = 
|buy        = 
|price      = 
|type1      = 
|type2      = 
|type3      = 
|type4      = 
|type5      = 
|size       = 
|uses       = 
}}
  • Types:
    • Use type or type1...type5
    • Skill, needs, money, toy, crafting, decorative, appliance, aspiration reward, career reward, electronics, food, vehicle, special, others, etc. A complete list is at {{GetObjectCats}}.
  • Buyability
    • Buy mode (for objects available in Buy mode), Build mode (for objects available in Build mode), Community lot (for objects bought on community lots)
    • Limited (rewards/unlockable)
    • No (NPC object/scenario objects)
  • Uses
    • Use for objects which have a limited number of uses, or can only be used for a limited amount of time.

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