Difference between revisions of "Template:Main-panel"
Jump to navigation
Jump to search
(Better handling of empty |ask) |
(image_width) |
||
Line 5: | Line 5: | ||
|ask= ''The SMW Query expression<br/> | |ask= ''The SMW Query expression<br/> | ||
|image= image for the section header<br/> | |image= image for the section header<br/> | ||
+ | |image= image wudth, defaults to 65px<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/> | |limit= how many results to show (defaults to 6)<br/> | ||
Line 15: | Line 16: | ||
<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>{{#if:{{{ask|}}}| | <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>{{#if:{{{ask|}}}| | ||
<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|{{image_width|65px}}]]}} |
{{#Ask: {{{ask|}}} | {{#Ask: {{{ask|}}} | ||
|sort={{#if: {{{sort|}}}|{{{sort|}}}|Creation date}} | |sort={{#if: {{{sort|}}}|{{{sort|}}}|Creation date}} |
Latest revision as of 16:03, 2 March 2023
This template makes a panel for the main page.
Usage:
{{Main-panel
|ask= The SMW Query expression
|image= image for the section header
|image= image wudth, defaults to 65px
|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)
}}