Difference between revisions of "Template:SMWDocSection"

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

Revision as of 18:37, 1 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
}}