Difference between revisions of "Template:SMWObject"

From Wikispooks
Jump to navigation Jump to search
(has objectType)
(Count #descriptions)
 
(36 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>'''This template is for defining [[WikiSpooks:Semantic Objects|semantic objects]].''' It takes the following parameters:
+
<noinclude>'''This template is for defining [[Wikispooks:Semantic Objects|semantic objects]].'''  
 +
All pages that use it are listed at the page [[SMWObject]].[[category:Semantic Templates‎]]
 +
{{Explain parameters}}
 +
It takes the following parameters:
 
<poem>
 
<poem>
 
{{SMWObject
 
{{SMWObject
|{{t|description}}                 = <500 word summary ''([[Property:Description]])''
+
|{{t|description}}                     = <500 word summary ''([[Property:Description]])''
|{{t|{{BLUE|infobox}}}}             = The name of the infobox template used by this object (if any) ''([[Property:Has infobox]])''
+
|{{t|status}}                          = The status of this object ''([[Property:Has status]])''
|{{t|{{GREEN|KeyProperties}}}}     = Slash separated list of important properties of this page ''([[Property:Has keyProperties]])''
+
|{{t|{{BLUE|infobox}}}}               = The name of the infobox template used by this object (if any) ''([[Property:Has infobox]])''
|{{t|{{GREEN|KeyPropertyHeaders}}}} = Slash separated list of property descriptions (same length as the above) ''([[Property:Has keyPropertyHeaders]])''
+
|{{t|{{BLUE|logo}}}}                  = Option icon for this object ''([[Property:Has logo]])''
 +
|{{t|{{PURPLE|wikipedia}}}}            = URL of the matching Wikipedia page, if any ''([[Property:Has wikipediaPage]])''
 +
|{{t|{{VIOLET|key_properties}}}}       = Slash separated list of important properties of this page ''([[Property:Has keyProperties]])''
 +
|{{t|{{VIOLET|key_property_headers}}}} = Slash separated list of property descriptions (same length as the above) ''([[Property:Has keyPropertyHeaders]])''
 
}}
 
}}
</poem></noinclude><includeonly>[[Constitutes::SMWObject| ]]{{Description|{{{Description|}}}}}[[Has keyProperties::{{#if: {{{KeyProperties|}}}|{{{KeyProperties}}}|Has objectType/Description}}| ]][[Has keyPropertyHeaders::{{#if: {{{KeyPropertyHeaders|}}}|{{{KeyPropertyHeaders}}}|Type/Description}}| ]][[Has infobox::{{{infobox|}}}| ]]</includeonly>
+
</poem></noinclude><includeonly>{{HelpSection|image={{{logo|}}}}}[[Has logo::Image:{{{logo|}}}| ]]This [[Has objectClass::SMWObject]] has status "[[Has status::{{{status}}}]]". [[Wikispooks]] currently has [[:Category:{{plural|{{FULLPAGENAME}}}}|[[Has usageCount::{{#ask: [[Has objectClass::{{FULLPAGENAME}}]] | format=count}}]]]] pages which use [[Template:{{FULLPAGENAME}}]] ({{#ask: [[Has objectClass::{{FULLPAGENAME}}]][[Description::+]] | format=count}} with a description and {{#ask: [[Has objectClass::{{FULLPAGENAME}}]][[Is stub::True]] | format=count}} of them [[:Category:Stubs|Stubs]]). {{#if: {{{wikipedia|}}}|[[Has wikipediaPage::{{{wikipedia}}}| ]][[Has wikipediaPage2::{{{wikipedia}}}| ]]}}{{Description|{{{description|}}}}}[[Has infobox::{{{infobox|}}}| ]][[Has keyProperties::{{#if: {{{key_properties|}}}|{{{key_properties}}}|Has objectType/Description}}| ]][[Has keyPropertyHeaders::{{#if: {{{key_property_headers|}}}|{{{key_property_headers}}}|Type/Description}}| ]]
 +
 
 +
{{#ifeq: {{#ask: [[Has objectClass2::{{FULLPAGENAME}}]]|format=count}}|0||
 +
==Recent Edits==
 +
{{main-panel-tabstrip-with-icon/tab
 +
|image=pixel.png
 +
|title={{Capitalize|{{FULLPAGENAME}}}}
 +
|ask=[[Has objectClass2::{{FULLPAGENAME}}]]
 +
|limit=8}}}}</includeonly>

Latest revision as of 15:57, 13 January 2020

This template is for defining semantic objects. All pages that use it are listed at the page SMWObject.

Blue parameters are for a single Wikispooks page name (If no suitable page exists, then pick a title for a future page)
Brown parameters are for numbers
Green parameters are for comma-separated lists of page names (Or planned page names).
Navy parameters are for dates
Orange parameters are for booleans. (Usually, either "Yes" or just leave blank).
Purple parameters are URLs.
Violet parameters are slash-separated lists.
Pink parameters are for coordinates.
Crossed out parameters were formerly available, but have been upgraded. Some may still work, but do not use these.

It takes the following parameters:

{{SMWObject
|description = <500 word summary (Property:Description)
|status = The status of this object (Property:Has status)
|infobox = The name of the infobox template used by this object (if any) (Property:Has infobox)
|logo = Option icon for this object (Property:Has logo)
|wikipedia = URL of the matching Wikipedia page, if any (Property:Has wikipediaPage)
|key_properties = Slash separated list of important properties of this page (Property:Has keyProperties)
|key_property_headers = Slash separated list of property descriptions (same length as the above) (Property:Has keyPropertyHeaders)
}}