Template:Author: Difference between revisions

From Discourse DB
Jump to navigation Jump to search
No edit summary
(Changed query)
Line 7: Line 7:
</pre>
</pre>
{{#cargo_declare:_table=Authors|First_name=Text (hidden)|Last_name=Text (hidden)|Political_affiliation=Text}}
{{#cargo_declare:_table=Authors|First_name=Text (hidden)|Last_name=Text (hidden)|Political_affiliation=Text}}
</noinclude><includeonly>
</noinclude><includeonly>{{#cargo_store:_table=Authors|First_name={{{first name|}}}|Last_name={{{last name|}}}|Political_affiliation={{{political affiliation|}}} }}
This is an [[:Category:Authors|author]]. {{#set:Has first name={{{first name|}}}|Has last name={{{last name|}}} }}
This is an [[:Category:Authors|author]]. {{#set:Has first name={{{first name|}}}|Has last name={{{last name|}}} }}


Line 13: Line 13:


Items by this author:
Items by this author:
{{#ask:[[Was written by::{{PAGENAME}}]]|? Addresses topic|format=ul}}
{#cargo_query:tables=Items,Opinions
|join on=Items._pageName=Opinions._pageName
|where=Author HOLDS "{{PAGENAME}}"
|fields=Items._pageName,Topic,Position_link,Stance
|format=ul
}}


{{#cargo_store:_table=Authors|First_name={{{first name|}}}|Last_name={{{last name|}}}|Political_affiliation={{{political affiliation|}}} }}
[[Category:Authors]]
[[Category:Authors]]
{{DEFAULTSORT:{{#if:{{{last name|}}}|{{{last name}}}, {{{first name|}}}|{{PAGENAME}}}}}}
{{DEFAULTSORT:{{#if:{{{last name|}}}|{{{last name}}}, {{{first name|}}}|{{PAGENAME}}}}}}
</includeonly>
</includeonly>

Revision as of 20:09, November 13, 2014

This template holds information on an author of opinion items; it should be called with the following structure:

{{Author
|first name=The author's first name; used for sorting
|last name=The author's last name; used for sorting
|political affiliation=Liberal, Conservative, etc. (This is a very subjective field)
}}

This template defines the table "Authors". View table.