Template:Opinion: Difference between revisions

From Discourse DB
Jump to navigation Jump to search
(Added setting of item display properties, for better performance, and to get around lack of "?a.b" printout capability in SMW querying)
(Oops - properties should be part of #set_internal, not #set)
Line 6: Line 6:
Edit the page to see the template text.
Edit the page to see the template text.
</noinclude><includeonly>
</noinclude><includeonly>
{{#ifeq:{{{3|}}}||This item addresses the topic [[{{{1|}}}]].}}{{#ifeq:{{{3|}}}|for|This item argues for the position [[{{{1|}}} / {{{2|}}}|{{{2|}}}]] on the topic [[{{{1|}}}]].}}{{#ifeq:{{{3|}}}|against|This item argues against the position [[{{{1|}}} / {{{2|}}}|{{{2|}}}]] on the topic [[{{{1|}}}]].}}{{#ifeq:{{{3|}}}|mixed|This item takes a mixed stance on the position [[{{{1|}}} / {{{2|}}}|{{{2|}}}]] on the topic [[{{{1|}}}]].}}{{#set_internal:Is opinion in|Covers topic={{{1|}}}|Has position fragment={{{2|}}}|Has position={{{1|}}} / {{{2|}}}|Has stance={{{3|}}} }}
{{#ifeq:{{{3|}}}||This item addresses the topic [[{{{1|}}}]].}}{{#ifeq:{{{3|}}}|for|This item argues for the position [[{{{1|}}} / {{{2|}}}|{{{2|}}}]] on the topic [[{{{1|}}}]].}}{{#ifeq:{{{3|}}}|against|This item argues against the position [[{{{1|}}} / {{{2|}}}|{{{2|}}}]] on the topic [[{{{1|}}}]].}}{{#ifeq:{{{3|}}}|mixed|This item takes a mixed stance on the position [[{{{1|}}} / {{{2|}}}|{{{2|}}}]] on the topic [[{{{1|}}}]].}}{{#set_internal:Is opinion in
{{#set:Has full item display=<div style="border: 1px #cccccc solid; padding: 4px; margin: 10px 15px 4px 15px; background-color: #fafaea">{{#show:{{PAGENAME}}|?Has quote}}</div>
|Covers topic={{{1|}}}|Has position fragment={{{2|}}}|Has position={{{1|}}} / {{{2|}}}
<div style="margin: 0px 0px 20px 35px;">From {{PAGENAME}}, by {{#show:{{PAGENAME}}|?Was written by}} (<em>{{#show:{{PAGENAME}}|?Was published by}}</em>, {{#show:{{PAGENAME}}|?Was published on}}) ([{{#show:{{PAGENAME}}|?Has URL|link=none}} view])</div>}} {{#set:Has item summary={{PAGENAME}} by {{#show:{{PAGENAME}}|?Was written by}} (<em>{{#show:{{PAGENAME}}|?Was published by}}</em>, {{#show:{{PAGENAME}}|?Was published on}}) ([{{#show:{{PAGENAME}}|?Has URL|link=none}} view])}}</includeonly>
|Has stance={{{3|}}}
|Has full item display=<div style="border: 1px #cccccc solid; padding: 4px; margin: 10px 15px 4px 15px; background-color: #fafaea">{{#show:{{PAGENAME}}|?Has quote}}</div>
<div style="margin: 0px 0px 20px 35px;">From {{PAGENAME}}, by {{#show:{{PAGENAME}}|?Was written by}} (<em>{{#show:{{PAGENAME}}|?Was published by}}</em>, {{#show:{{PAGENAME}}|?Was published on}}) ([{{#show:{{PAGENAME}}|?Has URL|link=none}} view])</div>
|Has item summary={{PAGENAME}} by {{#show:{{PAGENAME}}|?Was written by}} (<em>{{#show:{{PAGENAME}}|?Was published by}}</em>, {{#show:{{PAGENAME}}|?Was published on}}) ([{{#show:{{PAGENAME}}|?Has URL|link=none}} view])
}}</includeonly>

Revision as of 20:00, December 19, 2011

This is the template for an opinion instance. It should be called in the following format:

{{Opinion|topic|position fragment|stance}}

Edit the page to see the template text.