Many thanks to our Patrons who cover ~2/3 of our hosting bill. Please join them if you can.
Difference between revisions of "Template:Ask/Main"
Jump to navigation
Jump to search
m (t) |
(|sort) |
||
Line 6: | Line 6: | ||
|mainlabel=Example | |mainlabel=Example | ||
|format=table | |format=table | ||
+ | |sort=Started | ||
|properties=Started/ON has cause/Has cause/Description | |properties=Started/ON has cause/Has cause/Description | ||
|headers=Date/Attributed to/Perpetrator(s)/Description | |headers=Date/Attributed to/Perpetrator(s)/Description | ||
Line 11: | Line 12: | ||
Currently supports up to 7 columns specified by <font face="courier">|properties</font> and <font face="courier">|headers</font>, as a /-separated list | Currently supports up to 7 columns specified by <font face="courier">|properties</font> and <font face="courier">|headers</font>, as a /-separated list | ||
</noinclude><includeonly> | </noinclude><includeonly> | ||
− | {{#if: {{#titleparts: {{{properties}}} | -6 }}|{{#ask: {{{expression}}} |mainlabel={{{mainlabel|}}}|format=table | + | {{#if: {{#titleparts: {{{properties}}} | -6 }}|{{#ask: {{{expression}}} |sort={{{sort|}}} |mainlabel={{{mainlabel|}}}|format=table |
|?{{#titleparts: {{{properties}}}|1|1}}={{#titleparts: {{{headers}}}|1|1}} | |?{{#titleparts: {{{properties}}}|1|1}}={{#titleparts: {{{headers}}}|1|1}} | ||
|?{{#titleparts: {{{properties}}}|1|2}}={{#titleparts: {{{headers}}}|1|2}} | |?{{#titleparts: {{{properties}}}|1|2}}={{#titleparts: {{{headers}}}|1|2}} | ||
Line 19: | Line 20: | ||
|?{{#titleparts: {{{properties}}}|1|6}}={{#titleparts: {{{headers}}}|1|6}} | |?{{#titleparts: {{{properties}}}|1|6}}={{#titleparts: {{{headers}}}|1|6}} | ||
|?{{#titleparts: {{{properties}}}|1|7}}={{#titleparts: {{{headers}}}|1|7}} | |?{{#titleparts: {{{properties}}}|1|7}}={{#titleparts: {{{headers}}}|1|7}} | ||
− | }}|{{#if: {{#titleparts: {{{properties}}} | -5 }}|{{#ask: {{{expression}}} |mainlabel={{{mainlabel|}}}|format=table | + | }}|{{#if: {{#titleparts: {{{properties}}} | -5 }}|{{#ask: {{{expression}}} |sort={{{sort|}}} |mainlabel={{{mainlabel|}}}|format=table |
|?{{#titleparts: {{{properties}}}|1|1}}={{#titleparts: {{{headers}}}|1|1}} | |?{{#titleparts: {{{properties}}}|1|1}}={{#titleparts: {{{headers}}}|1|1}} | ||
|?{{#titleparts: {{{properties}}}|1|2}}={{#titleparts: {{{headers}}}|1|2}} | |?{{#titleparts: {{{properties}}}|1|2}}={{#titleparts: {{{headers}}}|1|2}} | ||
Line 26: | Line 27: | ||
|?{{#titleparts: {{{properties}}}|1|5}}={{#titleparts: {{{headers}}}|1|5}} | |?{{#titleparts: {{{properties}}}|1|5}}={{#titleparts: {{{headers}}}|1|5}} | ||
|?{{#titleparts: {{{properties}}}|1|6}}={{#titleparts: {{{headers}}}|1|6}} | |?{{#titleparts: {{{properties}}}|1|6}}={{#titleparts: {{{headers}}}|1|6}} | ||
− | }}|{{#if: {{#titleparts: {{{properties}}} | -4 }}|{{#ask: {{{expression}}} |mainlabel={{{mainlabel|}}}|format=table | + | }}|{{#if: {{#titleparts: {{{properties}}} | -4 }}|{{#ask: {{{expression}}} |sort={{{sort|}}} |mainlabel={{{mainlabel|}}}|format=table |
|?{{#titleparts: {{{properties}}}|1|1}}={{#titleparts: {{{headers}}}|1|1}} | |?{{#titleparts: {{{properties}}}|1|1}}={{#titleparts: {{{headers}}}|1|1}} | ||
|?{{#titleparts: {{{properties}}}|1|2}}={{#titleparts: {{{headers}}}|1|2}} | |?{{#titleparts: {{{properties}}}|1|2}}={{#titleparts: {{{headers}}}|1|2}} | ||
Line 32: | Line 33: | ||
|?{{#titleparts: {{{properties}}}|1|4}}={{#titleparts: {{{headers}}}|1|4}} | |?{{#titleparts: {{{properties}}}|1|4}}={{#titleparts: {{{headers}}}|1|4}} | ||
|?{{#titleparts: {{{properties}}}|1|5}}={{#titleparts: {{{headers}}}|1|5}} | |?{{#titleparts: {{{properties}}}|1|5}}={{#titleparts: {{{headers}}}|1|5}} | ||
− | }}|{{#if: {{#titleparts: {{{properties}}} | -3 }}|{{#ask: {{{expression}}} |mainlabel={{{mainlabel|}}}|format=table | + | }}|{{#if: {{#titleparts: {{{properties}}} | -3 }}|{{#ask: {{{expression}}} |sort={{{sort|}}} |mainlabel={{{mainlabel|}}}|format=table |
|?{{#titleparts: {{{properties}}}|1|1}}={{#titleparts: {{{headers}}}|1|1}} | |?{{#titleparts: {{{properties}}}|1|1}}={{#titleparts: {{{headers}}}|1|1}} | ||
|?{{#titleparts: {{{properties}}}|1|2}}={{#titleparts: {{{headers}}}|1|2}} | |?{{#titleparts: {{{properties}}}|1|2}}={{#titleparts: {{{headers}}}|1|2}} | ||
|?{{#titleparts: {{{properties}}}|1|3}}={{#titleparts: {{{headers}}}|1|3}} | |?{{#titleparts: {{{properties}}}|1|3}}={{#titleparts: {{{headers}}}|1|3}} | ||
|?{{#titleparts: {{{properties}}}|1|4}}={{#titleparts: {{{headers}}}|1|4}} | |?{{#titleparts: {{{properties}}}|1|4}}={{#titleparts: {{{headers}}}|1|4}} | ||
− | }}|{{#if: {{#titleparts: {{{properties}}} | -2 }}|{{#ask: {{{expression}}} |mainlabel={{{mainlabel|}}}|format=table | + | }}|{{#if: {{#titleparts: {{{properties}}} | -2 }}|{{#ask: {{{expression}}} |sort={{{sort|}}} |mainlabel={{{mainlabel|}}}|format=table |
|?{{#titleparts: {{{properties}}}|1|1}}={{#titleparts: {{{headers}}}|1|1}} | |?{{#titleparts: {{{properties}}}|1|1}}={{#titleparts: {{{headers}}}|1|1}} | ||
|?{{#titleparts: {{{properties}}}|1|2}}={{#titleparts: {{{headers}}}|1|2}} | |?{{#titleparts: {{{properties}}}|1|2}}={{#titleparts: {{{headers}}}|1|2}} | ||
|?{{#titleparts: {{{properties}}}|1|3}}={{#titleparts: {{{headers}}}|1|3}} | |?{{#titleparts: {{{properties}}}|1|3}}={{#titleparts: {{{headers}}}|1|3}} | ||
− | }}|{{#if: {{#titleparts: {{{properties}}} | -1 }}|{{#ask: {{{expression}}} |mainlabel={{{mainlabel|}}}|format=table | + | }}|{{#if: {{#titleparts: {{{properties}}} | -1 }}|{{#ask: {{{expression}}} |sort={{{sort|}}} |mainlabel={{{mainlabel|}}}|format=table |
|?{{#titleparts: {{{properties}}}|1|1}}={{#titleparts: {{{headers}}}|1|1}} | |?{{#titleparts: {{{properties}}}|1|1}}={{#titleparts: {{{headers}}}|1|1}} | ||
|?{{#titleparts: {{{properties}}}|1|2}}={{#titleparts: {{{headers}}}|1|2}} | |?{{#titleparts: {{{properties}}}|1|2}}={{#titleparts: {{{headers}}}|1|2}} | ||
− | }}|{{#if: {{#titleparts: {{{properties}}} | 1 }}|{{#ask: {{{expression}}} |mainlabel={{{mainlabel|}}}|format=table | + | }}|{{#if: {{#titleparts: {{{properties}}} | 1 }}|{{#ask: {{{expression}}} |sort={{{sort|}}} |mainlabel={{{mainlabel|}}}|format=table |
|?{{#titleparts: {{{properties}}}|1|1}}={{#titleparts: {{{headers}}}|1|1}} | |?{{#titleparts: {{{properties}}}|1|1}}={{#titleparts: {{{headers}}}|1|1}} | ||
}}|{{#ask: {{{expression}}} |mainlabel={{{mainlabel|}}}|format=table}} | }}|{{#ask: {{{expression}}} |mainlabel={{{mainlabel|}}}|format=table}} | ||
}}}}}}}}}}}}}}</includeonly> | }}}}}}}}}}}}}}</includeonly> |
Revision as of 16:02, 1 June 2014
Not to be confused with the parser function, #Ask: from Semantic MediaWiki, this template calls that one, but as a template it is more flexible in allowing a variable number of columns.
Example Usage:
{{ask
|expression= [[Constitutes::{{PAGENAME}}]] OR [[DocType::{{PAGENAME}}]] OR [[DocType::{{Uncapitalize|{{PAGENAME}}}}]]
|mainlabel=Example
|format=table
|sort=Started
|properties=Started/ON has cause/Has cause/Description
|headers=Date/Attributed to/Perpetrator(s)/Description
}}
Currently supports up to 7 columns specified by |properties and |headers, as a /-separated list