Difference between revisions of "Template:Main-panel"

From Wikispooks
Jump to navigation Jump to search
("Creation date" as default)
(Add |limit and reduce default #results from 8 to 6)
Line 6: Line 6:
 
|image= image for the section header<br/>
 
|image= image for the section header<br/>
 
|alt= alt text for the image<br/>
 
|alt= alt text for the image<br/>
 +
|limit= how many results to show (defaults to 6)<br/>
 
|link= where to link the image<br/>
 
|link= where to link the image<br/>
 
|title= section title<br/>
 
|title= section title<br/>
Line 18: Line 19:
 
|order=descending
 
|order=descending
 
|format=ul
 
|format=ul
|limit=8
+
|limit={{#if: {{{limit|}}}|{{{limit}}}|6}}
 
}}
 
}}
 
</div>
 
</div>

Revision as of 14:40, 26 July 2014

This template makes a panel for the main page.

Usage:
{{Main-panel
|ask= The SMW Query expression
|image= image for the section header
|alt= alt text for the image
|limit= how many results to show (defaults to 6)
|link= where to link the image
|title= section title
|sort= property to sort on (defaults to Creation date)
}}