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
(expr->expression) |
m (desc) |
||
Line 1: | Line 1: | ||
<noinclude>'''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.'''<br/> | <noinclude>'''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.'''<br/> | ||
Example Usage:<br/> | Example Usage:<br/> | ||
− | < | + | <pre> |
{{ask | {{ask | ||
|expression= [[Constitutes::{{PAGENAME}}]] OR [[DocType::{{PAGENAME}}]] OR [[DocType::{{Uncapitalize|{{PAGENAME}}}}]] | |expression= [[Constitutes::{{PAGENAME}}]] OR [[DocType::{{PAGENAME}}]] OR [[DocType::{{Uncapitalize|{{PAGENAME}}}}]] | ||
Line 8: | Line 8: | ||
|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 | ||
− | }}</ | + | }}</pre> |
− | Currently | + | Currently supports up to 7 columns specified by <pre>|properties</pre> and <pre>|headers</pre>, as a /-separated list |
</noinclude><includeonly> | </noinclude><includeonly> | ||
{{#if: {{#titleparts: {{{properties}}} | -6 }}|{{#ask: {{{expression}}} |mainlabel={{{mainlabel|}}}|format=table | {{#if: {{#titleparts: {{{properties}}} | -6 }}|{{#ask: {{{expression}}} |mainlabel={{{mainlabel|}}}|format=table |
Revision as of 18:17, 1 January 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 |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