Difference between revisions of "Template:SMWDocSection"

From Wikispooks
Jump to navigation Jump to search
(Remove the image element from SMW results table)
Line 14: Line 14:
 
}}</pre></noinclude><includeonly>{{#ifexpr:{{#ask: {{{expression|}}}|format=count}}>0|&nbsp;
 
}}</pre></noinclude><includeonly>{{#ifexpr:{{#ask: {{{expression|}}}|format=count}}>0|&nbsp;
 
=={{spz|{{#ask: {{{expression|}}}|format=count}}|{{{caption_singular|}}}|{{{caption_plural|}}}}}==
 
=={{spz|{{#ask: {{{expression|}}}|format=count}}|{{{caption_singular|}}}|{{{caption_plural|}}}}}==
{{#ifexpr: {{#ask: {{{expression|}}}|format=count}}=1|
+
<!--{{#ifexpr: {{#ask: {{{expression|}}}|format=count}}=1|
  
<small>''Use the Up/Dn symbols to sort''</small>}}{{ask
+
<small>''Use the Up/Dn symbols to sort''</small>}}
 +
Not really needed. 2017-12-02
 +
-->{{ask
 
|format=table
 
|format=table
 
|sort={{{sort|}}}
 
|sort={{{sort|}}}

Revision as of 16:37, 2 December 2017

Bug1.jpg This template has problems: This sometimes creates blank sections. This is believed to be when the items contain badly formed semantic data. Use the discussion page to see the debate about this.

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

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