Difference between revisions of "Template:SMWData"

From Wikispooks
Jump to navigation Jump to search
(SMWDefaultMarkup)
(key sort, key order)
 
(13 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
'''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.<br/>
 
'''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.<br/>
 
(So, not for {{temp|website}}s, {{temp|document}}s, {{temp|event}}s, files or {{temp|person}}s)'''<br/>
 
(So, not for {{temp|website}}s, {{temp|document}}s, {{temp|event}}s, files or {{temp|person}}s)'''<br/>
''The only parameter displayed is the 'description'.'' - All the other parameters contribute only to the document's semantic mark up.
+
{{Explain parameters}}
{{BLUE|The blue parameters not be marked up at all; they should be Wikispooks page names (whether or not the page yet exists).}}<br/>
 
{{GREEN|The green parameters should be /-separated lists.}}<br/>
 
 
'''Usage:'''
 
'''Usage:'''
 
<poem>
 
<poem>
 
{{{{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|constitutes}}}}=pagename(s) which this subject constitutes (e.g. "genocide, war crime") ([[Property:Constitutes]])
|{{t|{{BLUE|ON_constitutes}}}}=a pagename which this subject constitutes according to the official narrative ([[Property:ON_constitutes]])
+
|{{t|{{GREEN|perpetrators}}}}=pagename(s) of the peopel or groups responsible according to the official narrative ([[Property:ON_has_perpetrator]])
|{{t|{{BLUE|Constitutes}}}}=a pagename which this subject constitutes (e.g. "censorship", "lone nut") ([[Property:Constitutes]])
+
|{{t|{{GREEN|ON_constitutes}}}}=pagename(s) which this subject constitutes according to the official narrative ([[Property:ON_constitutes]])
|{{t|{{BLUE|Constitutes2}}}}...=
+
|{{t|{{GREEN|ON_perpetrators}}}}=pagename(s) of the peopel or groups responsible according to the official narrative ([[Property:ON_has_cause]])
|{{t|Description}}=Document description
+
|{{t|description}}=Document description
|{{t|{{BLUE|Subject}}}}=The subject of the document
+
|{{t|wikipedia}}=Wikipedia URL
|{{t|{{BLUE|Subject2}}}}, {{t|{{BLUE|Subject3}}}}... =Extra subjects<!-- UNUSED AS YET
+
|{{t|{{GREEN|subjects}}}}=The subject(s) of the document
|{{t|SubjectDetail}}... = Explaining the relevant
+
|{{t|{{VIOLET|key_properties}}}}= Slash separated list of important properties of this page ''([[Property:Has keyProperties]])''
|{{t|Subject2Detail}} |{{t|Subject3Detail}}... -->
+
|{{t|{{VIOLET|key_property_headers}}}}= Slash separated list of property descriptions (same length as the above) ''([[Property:Has keyPropertyHeaders]])''
|{{t|{{GREEN|KeyProperties}}}}= Slash separated list of important properties of this page
+
|{{t|key_sort}}=Name of the key to sort on
|{{t|{{GREEN|KeyPropertyHeaders}}}}= Slash separated list of property descriptions (same length as the above)
+
|{{t|key_order}}={ascending,descending}
 
}}
 
}}
 
</poem>
 
</poem>
</noinclude><includeonly>{{Description|{{{Description|}}}}}{{#if: {{{KeyProperties|}}}|[[Has keyProperties::{{{KeyProperties}}}| ]]}}{{#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: {{{key_properties|}}}|[[Has keyProperties::{{{key_properties}}}| ]]}}{{#if: {{{key_sort|}}}|[[Has keySort::{{{key_sort}}}| ]]}}{{#if: {{{key_order|}}}|[[Has keyOrder::{{{key_order}}}| ]]}}{{#if: {{{Wikipedia|}}}|[[Has wikipediaPage::{{{Wikipedia}}}| ]]}}{{#if: {{{key_property_headers|}}}|[[Has keyPropertyHeaders::{{{key_property_headers}}}| ]]}}{{ONPropertyPair|constitutes|{{{constitutes|}}}|{{{ON_constitutes|}}}}}{{ONPropertyPair|has perpetrator|{{{perpetrators|}}}|{{{ON_perpetrators|}}}}}{{ArrayMapProperty|{{{subjects|}}}|Is about}}
 +
{{SMWDefaultMarkup}}</includeonly>

Latest revision as of 14:47, 17 September 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:
|constitutes=pagename(s) which this subject constitutes (e.g. "genocide, war crime") (Property:Constitutes)
|perpetrators=pagename(s) of the peopel or groups responsible according to the official narrative (Property:ON_has_perpetrator)
|ON_constitutes=pagename(s) which this subject constitutes according to the official narrative (Property:ON_constitutes)
|ON_perpetrators=pagename(s) of the peopel or groups responsible according to the official narrative (Property:ON_has_cause)
|description=Document description
|wikipedia=Wikipedia URL
|subjects=The subject(s) of the document
|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)
|key_sort=Name of the key to sort on
|key_order={ascending,descending}
}}