Template:Position: Difference between revisions

From Discourse DB
Jump to navigation Jump to search
(Making the ASK queries easier to read)
(Switched to "Item full display" query template, and named args)
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
This is the 'Position' template; edit the page to see the source code.
This is the 'Position' template; it should be called in the following format:
<pre>
{{Position}}
</pre>
Edit the page to see the source code.
</noinclude><includeonly>
</noinclude><includeonly>
<big>'''[[:Category:Positions|Position]]: [[Name:={{#sub:{{PAGENAME}}|{{#expr:{{#pos:{{PAGENAME}}|/|}}+2}}|}}]]'''</big>
<big>'''[[:Category:Positions|Position]]: {{#sub:{{PAGENAME}}|{{#expr:{{#pos:{{PAGENAME}}|/}}+2}}|}}'''</big>


''This position addresses the topic [[Addresses topic::{{#sub:{{PAGENAME}}|0|{{#expr:{{#pos:{{PAGENAME}}|/|}}-1}}}}]].''
''This position addresses the topic [[{{#sub:{{PAGENAME}}|0|{{#expr:{{#pos:{{PAGENAME}}|/}}-1}}}}]].''




<font size="+1">For this position</font>
<font size="+1">For this position</font>
<hr>
<hr>
{{#ask: [[is for::{{PAGENAME}}]]
{{#cargo_query:tables=Items,Opinions
  |format=template
|join on=Items._pageName=Opinions._pageName
  |template=ItemQuery
|where=Opinions.Position="{{PAGENAME}}" AND Opinions.Stance = 'for'
  |sort=Was published on
|fields=Items._pageName=Title,Author,Source,date_format(Date, '%M %e, %Y')=Date,URL,Quote
  |order=descending
|format=template
  |link=subject
|template=Item full display
  |? Was written by
|named args=yes
  |? Was published by
|order by=Date DESC
  |? Was published on
  |? Has URL
  |? Has quote
}}
}}
<div style="clear:both;"></div>
<div style="clear:both;"></div>
Line 25: Line 26:
<font size="+1">Against this position</font>
<font size="+1">Against this position</font>
<hr>
<hr>
{{#ask: [[is against::{{PAGENAME}}]]
{{#cargo_query:tables=Items,Opinions
  |format=template
|join on=Items._pageName=Opinions._pageName
  |template=ItemQuery
|where=Opinions.Position="{{PAGENAME}}" AND Opinions.Stance = 'against'
  |sort=Was published on
|fields=Items._pageName=Title,Author,Source,date_format(Date, '%M %e, %Y')=Date,URL,Quote
  |order=descending
|format=template
  |link=subject
|template=Item full display
  |? Was written by
|named args=yes
  |? Was published by
|order by=Date DESC
  |? Was published on
  |? Has URL
  |? Has quote
}}
}}
<div style="clear:both;"></div>
<div style="clear:both;"></div>
Line 41: Line 39:
<font size="+1">Mixed on this position</font>
<font size="+1">Mixed on this position</font>
<hr>
<hr>
{{#ask: [[is mixed on::{{PAGENAME}}]]
{{#cargo_query:tables=Items,Opinions
  |format=template
|join on=Items._pageName=Opinions._pageName
  |template=ItemQuery
|where=Opinions.Position="{{PAGENAME}}" AND Opinions.Stance = 'mixed'
  |sort=Was published on
|fields=Items._pageName=Title,Author,Source,date_format(Date, '%M %e, %Y')=Date,URL,Quote
  |order=descending
|format=template
  |link=subject
|template=Item full display
  |? Was written by
|named args=yes
  |? Was published by
|order by=Date DESC
  |? Was published on
  |? Has URL
  |? Has quote
}}
}}
<div style="clear:both;"></div>
<div style="clear:both;"></div>
[[Category:Positions]]</includeonly>
[[Category:Positions]]</includeonly>

Latest revision as of 20:21, January 29, 2016

This is the 'Position' template; it should be called in the following format:

{{Position}}

Edit the page to see the source code.