Difference between revisions of "Template:SMWDocSection"

From Wikispooks
Jump to navigation Jump to search
(test)
m
Line 12: Line 12:
 
{{#switch:{{#ask: {{{expression|}}}|format=count}}
 
{{#switch:{{#ask: {{{expression|}}}|format=count}}
 
|0=none
 
|0=none
|1={{section|{{{captionSingular}}}}}
+
|1={{section|{{{captionSingular|}}}}}
|x{{section|{{{captionPlural}}}}}
+
|x{{section|{{{captionPlural|}}}}}
 
<small>''Use the Up/Dn symbols to sort''</small>
 
<small>''Use the Up/Dn symbols to sort''</small>
 
|}}{{ask
 
|}}{{ask

Revision as of 04:23, 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
}}