Difference between revisions of "Template:SMWDocSection"

From Wikispooks
Jump to navigation Jump to search
(switch)
(test)
Line 9: Line 9:
 
|properties=DocType/Has publication date/Is about/Description
 
|properties=DocType/Has publication date/Is about/Description
 
|headers=Document type/Publication date/Subject(s)/Description
 
|headers=Document type/Publication date/Subject(s)/Description
}}</pre></noinclude><includeonly>
+
}}</pre></noinclude><includeonly>{{#ask: {{{expression|}}}|format=count}}
 
{{#switch: {{#ask: {{{expression|}}}|format=count}}
 
{{#switch: {{#ask: {{{expression|}}}|format=count}}
 
|0=
 
|0=
Line 21: Line 21:
 
|mainlabel={{{mainlabel|}}}
 
|mainlabel={{{mainlabel|}}}
 
|properties={{{properties|}}}
 
|properties={{{properties|}}}
|headers={{{headers|}}}}}}}</includeonly>
+
|headers={{{headers|}}}}}</includeonly>

Revision as of 04:01, 2 January 2014

This template places a list of data items in its own section.
Example usage:

{{SMWDocSection
|expression= [[Has author::{{PAGENAME}}]]
|captionSingular= {{PAGENAME}} on Wikispooks
|captionPlural= {{PAGENAME}} on Wikispooks
|mainlabel = Wikispooks page
|properties=DocType/Has publication date/Is about/Description
|headers=Document type/Publication date/Subject(s)/Description
}}