Difference between revisions of "Template:SMWData"

From Wikispooks
Jump to navigation Jump to search
m (Fix appearance)
(trim)
Line 15: Line 15:
 
|{{t|SubjectDetail}}... = Explaining the relevant
 
|{{t|SubjectDetail}}... = Explaining the relevant
 
|{{t|Subject2Detail}} |{{t|Subject3Detail}}... -->
 
|{{t|Subject2Detail}} |{{t|Subject3Detail}}... -->
|{{t|KeyProperties}}= Comma separated list of key properties of this page
+
|{{t|KeyProperties}}= Comma separated list of key property#label items of this page
|{{t|KeyPropertyCaptions}}= matching list of key property descriptors
 
 
}}
 
}}
 
</poem>
 
</poem>
</noinclude><includeonly>{{#if: {{{Description|}}} | [[Description::{{{Description}}}| ]]}}{{#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}}}| ]]}}{{#arraymap:{{{KeyProperties|}}}|,|@@@@|[[Has key property::@@@@| ]]}}{{#arraymap:{{{KeyPropertyCaptions|}}}|,|@@@@|[[Has key property caption::@@@@| ]]}}
+
</noinclude><includeonly>{{#if: {{{Description|}}} | [[Description::{{{Description}}}| ]]}}{{#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}}}| ]]}}{{#if: {{{KeyProperties|}}}[[Has key properties::{{{KeyProperties}}}]]}}</includeonly>
</includeonly>
 

Revision as of 15:12, 30 December 2013

This template is for adding SMW data where no main template is in use. 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)
It doesn't produce any visual output - it only adds semantic data to the document. As such, it can be placed anywhere in the document, however it is good practice to use it at the top. The blue parameter not be marked up at all; they should be Wikispooks page names (whether or not the page yet exists).
Usage:

{{SMWData
OPTIONAL DETAILS:
|Constitutes=a pagename which this subject consitutues (e.g. "censorship", "lone nut") (Property:Constitutes)
|Constitutes2...=
|Description=Document description
|Subject=The subject of the document
|Subject2, Subject3... =Extra subjects
|KeyProperties= Comma separated list of key property#label items of this page
}}