Difference between revisions of "Template:SMWDocSection"

From Wikispooks
Jump to navigation Jump to search
(trim whitespace)
(whitespace fix)
Line 12: Line 12:
 
{{section|{{{captionSingular|}}}}}|{{#ifexpr:{{#ask: {{{expression|}}}|format=count}}>0|
 
{{section|{{{captionSingular|}}}}}|{{#ifexpr:{{#ask: {{{expression|}}}|format=count}}>0|
 
{{section|{{{captionPlural|}}}}}
 
{{section|{{{captionPlural|}}}}}
<small>''Use the Up/Dn symbols to sort''</small>}}}}{{ask
+
<small>''Use the Up/Dn symbols to sort''</small>}}}}{{#ifexpr:{{#ask: {{{expression|}}}|format=count}}>0|{{ask
 
|format=table
 
|format=table
 
|expression={{{expression|}}}
 
|expression={{{expression|}}}
 
|mainlabel={{{mainlabel|}}}
 
|mainlabel={{{mainlabel|}}}
 
|properties={{{properties|}}}
 
|properties={{{properties|}}}
|headers={{{headers|}}}}}</includeonly>
+
|headers={{{headers|}}}}}<br/>}}</includeonly>

Revision as of 15:16, 20 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
}}