Difference between revisions of "Template:SMWData"

From Wikispooks
Jump to navigation Jump to search
(Explain parameters)
(Update to use SMW)
Line 7: Line 7:
 
{{{{t|SMWData}}
 
{{{{t|SMWData}}
 
''OPTIONAL DETAILS:''
 
''OPTIONAL DETAILS:''
|{{t|{{BLUE|ON_cause}}}}=a pagename which this subject caused according to the official narrative ([[Property:ON_has_cause]])
+
|{{t|{{GREEN|ON_cause}}}}=a pagename which this subject caused according to the official narrative ([[Property:ON_has_cause]])
|{{t|{{BLUE|ON_constitutes}}}}=a pagename which this subject constitutes according to the official narrative ([[Property:ON_constitutes]])
+
|{{t|{{GREEN|ON_constitutes}}}}=pagename(s) which this subject constitutes according to the official narrative ([[Property:ON_constitutes]])
|{{t|{{BLUE|Constitutes}}}}=a pagename which this subject constitutes (e.g. "censorship", "lone nut") ([[Property:Constitutes]])
+
|{{t|{{GREEN|constitutes}}}}=pagename(s) which this subject constitutes (e.g. "genocide, war crime") ([[Property:Constitutes]])
|{{t|{{BLUE|Constitutes2}}}}...=
 
 
|{{t|description}}=Document description
 
|{{t|description}}=Document description
 
|{{t|wikipedia}}=Wikipedia URL
 
|{{t|wikipedia}}=Wikipedia URL
|{{t|{{BLUE|Subject}}}}=The subject of the document
+
|{{t|{{GREEN|subjects}}}}=The subject(s) of the document
|{{t|{{BLUE|Subject2}}}}, {{t|{{BLUE|Subject3}}}}... =Extra subjects<!-- UNUSED AS YET
 
|{{t|SubjectDetail}}... = Explaining the relevant
 
|{{t|Subject2Detail}} |{{t|Subject3Detail}}... -->
 
 
|{{t|{{VIOLET|KeyProperties}}}}= Slash separated list of important properties of this page ''([[Property:Has keyProperties]])''
 
|{{t|{{VIOLET|KeyProperties}}}}= Slash separated list of important properties of this page ''([[Property:Has keyProperties]])''
 
|{{t|{{VIOLET|KeyPropertyHeaders}}}}= Slash separated list of property descriptions (same length as the above) ''([[Property:Has keyPropertyHeaders]])''
 
|{{t|{{VIOLET|KeyPropertyHeaders}}}}= Slash separated list of property descriptions (same length as the above) ''([[Property:Has keyPropertyHeaders]])''
 
}}
 
}}
 
</poem>
 
</poem>
</noinclude><includeonly>{{Description|{{{Description|}}}}}{{#if: {{{KeyProperties|}}}|[[Has keyProperties::{{{KeyProperties}}}| ]]}}{{#if: {{{Wikipedia|}}}|[[Has wikipediaPage::{{{Wikipedia}}}| ]]}}{{#if: {{{KeyPropertyHeaders|}}}|[[Has keyPropertyHeaders::{{{KeyPropertyHeaders}}}| ]]}}{{#if: {{{ON_constitutes|}}}    | [[ON_constitutes::{{{ON_constitutes}}}| ]]}}{{#if: {{{ON_cause|}}}    | [[ON_has_cause::{{{ON_cause}}}| ]]}}{{#if: {{{Constitutes|}}}    | [[Constitutes::{{{Constitutes}}}| ]]}}{{#if: {{{Constitutes2|}}}    | [[Constitutes::{{{Constitutes2}}}| ]]}}{{#if: {{{Constitutes3|}}}    | [[Constitutes::{{{Constitutes3}}}| ]]}}{{#if: {{{Constitutes4|}}}     | [[Constitutes::{{{Constitutes4}}}| ]]}}{{#if: {{{Constitutes5|}}}     | [[Constitutes::{{{Constitutes5}}}| ]]}}{{#if: {{{Subject|}}}     | [[Is about::{{{Subject}}}| ]]}}{{#if: {{{Subject2|}}}    | [[Is about::{{{Subject2}}}| ]]}}{{#if: {{{Subject3|}}}    | [[Is about::{{{Subject3}}}| ]]}}{{#if: {{{Subject4|}}}  | [[Is about::{{Subject4}}}| ]]}}{{#if: {{{Subject5|}}}    | [[Is about::{{{Subject5}}}| ]]}}{{#if: {{{Subject6|}}}    | [[Is about::{{{Subject6}}}| ]]}}{{#if: {{{Subject7|}}}    | [[Is about::{{{Subject7}}}| ]]}}{{#if: {{{Subject8|}}}    | [[Is about::{{{Subject8}}}| ]]}}{{#if: {{{Subject9|}}}    | [[Is about::{{{Subject9}}}| ]]}}{{#if: {{{Subject10|}}}    | [[Is about::{{{Subject10}}}| ]]}}{{SMWDefaultMarkup}}</includeonly>
+
</noinclude><includeonly>{{Description|{{{Description|}}}}}{{#if: {{{KeyProperties|}}}|[[Has keyProperties::{{{KeyProperties}}}| ]]}}{{#if: {{{Wikipedia|}}}|[[Has wikipediaPage::{{{Wikipedia}}}| ]]}}{{#if: {{{KeyPropertyHeaders|}}}|[[Has keyPropertyHeaders::{{{KeyPropertyHeaders}}}| ]]}}{{ArrayMapProperty|{{{ON_case|}}}|ON has cause}}{{ArrayMapProperty|{{{constitutes|}}}|Constitutes}}{{ArrayMapProperty|{{{ON_constitutes|}}}|ON_constitutes}}{{ArrayMapProperty|{{{subjects|}}}|Is about}}
 +
{{SMWDefaultMarkup}}</includeonly>

Revision as of 19:09, 23 June 2014

This template is for adding SMW data where no main template is in use. It should be used at the top of the page. It should not be used when a template is already in use that adds SMW data.
(So, not for {{website}}s, {{document}}s, {{event}}s, files or {{person}}s)

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.

Usage:

{{SMWData
OPTIONAL DETAILS:
|ON_cause=a pagename which this subject caused according to the official narrative (Property:ON_has_cause)
|ON_constitutes=pagename(s) which this subject constitutes according to the official narrative (Property:ON_constitutes)
|constitutes=pagename(s) which this subject constitutes (e.g. "genocide, war crime") (Property:Constitutes)
|description=Document description
|wikipedia=Wikipedia URL
|subjects=The subject(s) of the document
|KeyProperties= Slash separated list of important properties of this page (Property:Has keyProperties)
|KeyPropertyHeaders= Slash separated list of property descriptions (same length as the above) (Property:Has keyPropertyHeaders)
}}