Difference between revisions of "Template:Main-panel"
Jump to navigation
Jump to search
(|alt) |
m (Text replacement - "WikiSpooks" to "Wikispooks") |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | <noinclude>'''This template makes a panel for the main page.'''[[Category: | + | <noinclude>'''This template makes a panel for the main page.'''[[Category:Wikispooks Mainpage Templates]]<br/> |
<br/> | <br/> | ||
Usage:<br/> | Usage:<br/> | ||
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/> | ||
− | |link= where to link the image<br/> | + | |limit= how many results to show (defaults to 6)<br/> |
+ | |link= where to link the image and text<br/> | ||
|title= section title<br/> | |title= section title<br/> | ||
− | |sort= property to sort on<br/> | + | |searchlabel="Further Results..." label (defaults to <empty>)<br/> |
+ | |sort= property to sort on (defaults to [[Property:Creation date|Creation date]])<br/> | ||
<nowiki>}}</nowiki> | <nowiki>}}</nowiki> | ||
</noinclude><includeonly><includeonly> | </noinclude><includeonly><includeonly> | ||
− | <div style="border-bottom:1px solid #9a9a9a; background-color:#d0e5f5; padding:0.5em 0.5em; font-size:112%;text-align:center;">'''{{{title|}}}'''</div> | + | <div style="border-bottom:1px solid #9a9a9a; background-color:#d0e5f5; padding:0.5em 0.5em; font-size:112%;text-align:center;">'''{{#if: {{{link|}}}|[[{{{link}}}|{{{title|}}}]]|{{{title|}}}}}'''</div> |
<div style="padding:0.5em 0.5em 0.5em 0.5em;font-size:102%;"> | <div style="padding:0.5em 0.5em 0.5em 0.5em;font-size:102%;"> | ||
{{#if: {{{image|}}}|[[Image:{{{image}}}|link={{{link|}}}|alt={{{alt|}}}|right|65px]]}} | {{#if: {{{image|}}}|[[Image:{{{image}}}|link={{{link|}}}|alt={{{alt|}}}|right|65px]]}} | ||
{{#Ask: {{{ask|}}} | {{#Ask: {{{ask|}}} | ||
− | |sort={{{sort|}}} | + | |sort={{#if: {{{sort|}}}|{{{sort|}}}|Creation date}} |
|order=descending | |order=descending | ||
|format=ul | |format=ul | ||
− | |limit= | + | |limit={{#if: {{{limit|}}}|{{{limit}}}|6}} |
+ | |searchlabel={{{searchlabel|}}} | ||
}} | }} | ||
</div> | </div> |
Revision as of 17:29, 14 October 2018
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 and text
|title= section title
|searchlabel="Further Results..." label (defaults to <empty>)
|sort= property to sort on (defaults to Creation date)
}}