Template:ReferenceTemplate: Difference between revisions

From IMAGE
Jump to navigation Jump to search
No edit summary
No edit summary
 
(30 intermediate revisions by 2 users not shown)
Line 21: Line 21:
</noinclude><includeonly>
</noinclude><includeonly>
<table class="PageWidthTableTemplate">
<table class="PageWidthTableTemplate">
<tr>
{{TableRowTemplate|header=Publication type:|prop=HasPublicationType}}
<td class="PageWidthTableFirstCell">'''Publication type:'''</td>
{{TableRowTemplate|header=Title:|prop=HasTitle}}
<td>{{#ifeq:{{{PublicationType|}}}||''unknown''|
{{TableRowTemplate|header=Authors:|prop=HasAuthorList}}
[[HasPublicationType::{{{PublicationType|}}}]]}}</td></tr>
{{TableRowTemplate|header=Secondary title:|prop=HasSecondaryTitle}}
{{#ifeq:{{{Title|}}}|||
{{TableRowTemplate|header=Secondary authors:|prop=HasSecondaryAuthor}}
<tr><td>Title:</td>
{{TableRowTemplate|header=Year:|prop=HasPublicationYear}}
<td>
{{TableRowTemplate|header=Journal:|prop=HasJournal}}
[[HasTitle::{{{Title|}}}]]</td></tr>
{{TableRowTemplate|header=Date:|prop=HasPublicationDate}}
}}{{#ifeq:{{{Author|}}}|||
{{TableRowTemplate|header=Book title:|prop=HasBookTitle}}
<tr><td>'''Authors:'''</td>
{{TableRowTemplate|header=Series title:|prop=HasSeriesTitle}}
<td>{{#arraymap:{{{Author|}}}|;|x|
{{TableRowTemplate|header=Conference name:|prop=HasConferenceName}}
[[HasAuthor::x]]}}</td></tr>
{{TableRowTemplate|header=Volume:|prop=HasVolume}}
}}{{#ifeq:{{{SecondaryTitle|}}}|||
{{TableRowTemplate|header=Issue:|prop=HasIssue}}
<tr><td>'''Secondary title:'''</td>
{{TableRowTemplate|header=Pages:|prop=HasPages}}
<td>
{{TableRowTemplate|header=Publisher:|prop=HasPublisher}}
[[HasSecondaryTitle::{{{SecondaryTitle|}}}]]</td></tr>
{{TableRowTemplate|header=City:|prop=HasCity}}
}}{{#ifeq:{{{SecondaryAuthor|}}}|||
{{TableRowTemplate|header=Institution:|prop=HasInstitution}}
<tr><td>'''Secondary authors:'''</td>
{{TableRowTemplate|header=Report number:|prop=HasReportNumber}}
<td>{{#arraymap:{{{SecondaryAuthor|}}}|;|x|
{{TableRowTemplate|header=Link to the PBL-website:|prop=HasPBLlink}}
[[HasSecondaryAuthor::x]]}}</td></tr>
{{TableRowTemplate|header=DOI or URL:|prop=HasDOI}}
}}{{#ifeq:{{{Year|}}}|||
{{TableRowTemplate|header=ISBN:|prop=HasISBN}}
<tr><td>'''Year:'''</td><td>
{{TableRowTemplate|header=Citation:|prop=HasFormattedReference}}
[[HasPublicationYear::{{{Year|}}}]]</td></tr>
}}{{#ifeq:{{{Date|}}}|||
<tr><td>'''Date:'''</td><td>
[[HasPublicationDate::{{{Date|}}}]]</td></tr>
}}{{#ifeq:{{{BookTitle|}}}|||
<tr><td>'''Book title:'''</td><td>
[[HasBookTitle::{{{BookTitle|}}}]]</td></tr>
}}{{#ifeq:{{{SeriesTitle|}}}|||
<tr><td>'''Series title:'''</td><td>
[[HasSeriesTitle::{{{SeriesTitle|}}}]]</td></tr>
}}{{#ifeq:{{{SeriesTitle2|}}}|||
<tr><td>'''Series title:'''</td><td>
[[HasSeriesTitle::{{{SeriesTitle2|}}}]]</td></tr>
}}{{#ifeq:{{{Editor|}}}|||
<tr><td>'''Editors:'''</td>
<td>{{#arraymap:{{{Editor|}}}|;|x|
[[HasEditor::x]]}}</td></tr>
}}{{#ifeq:{{{Editor2|}}}|||
<tr><td>'''Editors:'''</td>
<td>{{#arraymap:{{{Editor2|}}}|;|x|
[[HasEditor::x]]}}</td></tr>
}}{{#ifeq:{{{Editor3|}}}|||
<tr><td>'''Editors:'''</td>
<td>{{#arraymap:{{{Editor3|}}}|;|x|
[[HasEditor::x]]}}</td></tr>
}}{{#ifeq:{{{Journal|}}}|||
<tr><td>'''Journal:'''</td><td>
[[HasJournal::{{{Journal|}}}]]</td></tr>
}}{{#ifeq:{{{Volume|}}}|||
<tr><td>'''Volume:'''</td><td>
[[HasVolume::{{{Volume|}}}]]</td></tr>
}}{{#ifeq:{{{Volume2|}}}|||
<tr><td>'''Volume:'''</td><td>
[[HasVolume::{{{Volume2|}}}]]</td></tr>
}}{{#ifeq:{{{Volume3|}}}|||
<tr><td>'''Volume:'''</td><td>
[[HasVolume::{{{Volume3|}}}]]</td></tr>
}}{{#ifeq:{{{Volume4|}}}|||
<tr><td>'''Volume:'''</td><td>
[[HasVolume::{{{Volume4|}}}]]</td></tr>
}}{{#ifeq:{{{Volume5|}}}|||
<tr><td>'''Volume:'''</td><td>
[[HasVolume::{{{Volume5|}}}]]</td></tr>
}}{{#ifeq:{{{Issue|}}}|||
<tr><td>'''Issue:'''</td><td>
[[HasIssue::{{{Issue|}}}]]</td></tr>
}}{{#ifeq:{{{Pages|}}}|||
<tr><td>'''Pages:'''</td><td>
[[HasPages::{{{Pages|}}}]]</td></tr>
}}{{#ifeq:{{{Pages2|}}}|||
<tr><td>'''Pages:'''</td><td>
[[HasPages::{{{Pages2|}}}]]</td></tr>
}}{{#ifeq:{{{Pages3|}}}|||
<tr><td>'''Pages:'''</td><td>
[[HasPages::{{{Pages3|}}}]]</td></tr>
}}{{#ifeq:{{{Publisher|}}}|||
<tr><td>'''Publisher:'''</td><td>
[[HasPublisher::{{{Publisher|}}}]]</td></tr>
}}{{#ifeq:{{{Publisher2|}}}|||
<tr><td>'''Publisher:'''</td><td>
[[HasPublisher::{{{Publisher2|}}}]]</td></tr>
}}{{#ifeq:{{{Publisher3|}}}|||
<tr><td>'''Publisher:'''</td><td>
[[HasPublisher::{{{Publisher3|}}}]]</td></tr>
}}{{#ifeq:{{{Publisher4|}}}|||
<tr><td>'''Publisher:'''</td><td>
[[HasPublisher::{{{Publisher4|}}}]]</td></tr>
}}{{#ifeq:{{{Publisher5|}}}|||
<tr><td>'''Publisher:'''</td><td>
[[HasPublisher::{{{Publisher5|}}}]]</td></tr>
}}{{#ifeq:{{{City|}}}|||
<tr><td>'''City:'''</td><td>
[[HasCity::{{{City|}}}]]</td></tr>
}}{{#ifeq:{{{City2|}}}|||
<tr><td>'''City:'''</td><td>
[[HasCity::{{{City2|}}}]]</td></tr>
}}{{#ifeq:{{{City3|}}}|||
<tr><td>'''City:'''</td><td>
[[HasCity::{{{City3|}}}]]</td></tr>
}}{{#ifeq:{{{City4|}}}|||
<tr><td>'''City:'''</td><td>
[[HasCity::{{{City4|}}}]]</td></tr>
}}{{#ifeq:{{{City5|}}}|||
<tr><td>'''City:'''</td><td>
[[HasCity::{{{City5|}}}]]</td></tr>
}}{{#ifeq:{{{Institution|}}}|||
<tr><td>'''Institution:'''</td><td>
[[HasInstitution::{{{Institution|}}}]]</td></tr>
}}{{#ifeq:{{{ReportNumber|}}}|||
<tr><td>'''Report number:'''</td><td>
[[HasReportNumber::{{{ReportNumber|}}}]]</td></tr>
}}{{#ifeq:{{{PBL-link|}}}|||
<tr><td>'''Link to the PBL-website:'''</td><td>
[[HasPBLlink::{{{PBL-link|}}}]]</td></tr>
}}{{#ifeq:{{{DOI|}}}|||
<tr><td>'''DOI or URL:'''</td><td>
[[HasDOI::{{{DOI|}}}]]</td></tr>
}}{{#ifeq:{{{ISBN|}}}|||
<tr><td>'''ISBN:'''</td><td>
[[HasISBN::{{{ISBN|}}}]]</td></tr>
}}{{#ifeq:{{{ISBN2|}}}|||<tr><td>'''ISBN:'''</td><td>
[[HasISBN::{{{ISBN2|}}}]]</td></tr>
}}{{#ifeq:{{{ISBN3|}}}|||
<tr><td>'''ISBN:'''</td><td>
[[HasISBN::{{{ISBN3|}}}]]</td></tr>}}
<tr><td>Citation</td><td>{{#show:{{PAGENAME}}|?HasFormattedReference}}
</td></tr>}}
</table>
</table>
<!-- Arraymap function is used to call the FormattedReferenceTemplate with the appropiate parameters and then display and assign the result to the property "HasFormattedReference". This property can be used whenever you need a reference in citation format. -->
<!-- Arraymap function is used to call the FormattedReferenceTemplate with all reference parameters and  
{{#arraymap:
then display and assign the result to the property "HasFormattedReference".  
This property can be used whenever you need a reference in citation format. -->
{{FormattedReferenceTemplate
{{FormattedReferenceTemplate
|PublicationType={{{PublicationType|}}}
|PublicationType={{{PublicationType|}}}
|Publisher={{#ifeq:{{{Publisher|}}}||
{{#ifeq:{{{Publisher2|}}}||
{{#ifeq:{{{Publisher3|}}}||
{{#ifeq:{{{Publisher4|}}}||
{{#ifeq:{{{Publisher5|}}}||
|{{{Publisher5|}}}
}}
|{{{Publisher4|}}}
}}
|{{{Publisher3|}}}
}}
|{{{Publisher2|}}}
}}
|{{{Publisher|}}}
}}
|ISBN={{#ifeq:{{{ISBN|}}}||
{{#ifeq:{{{ISBN2|}}}||
{{#ifeq:{{{ISBN3|}}}||
|{{{ISBN3|}}}
}}
|{{{ISBN2|}}}
}}
|{{{ISBN|}}}
}}
|Editor={{#ifeq:{{{Editor|}}}||
{{#ifeq:{{{Editor2|}}}||
{{#ifeq:{{{Editor3|}}}||
|{{{Editor3|}}}
}}
|{{{Editor2|}}}
}}
|{{{Editor|}}}
}}
|Pages={{#ifeq:{{{Pages|}}}||
{{#ifeq:{{{Pages2|}}}||
{{#ifeq:{{{Pages3|}}}||
|{{{Pages3|}}}
}}
|{{{Pages2|}}}
}}
|{{{Pages|}}}
}}
|SeriesTitle={{#ifeq:{{{SeriesTitle|}}}||
{{#ifeq:{{{SeriesTitle2|}}}||
|{{{SeriesTitle2|}}}
}}
|{{{SeriesTitle|}}}
}}
|City={{#ifeq:{{{City|}}}||
{{#ifeq:{{{City2|}}}||
{{#ifeq:{{{City3|}}}||
{{#ifeq:{{{City4|}}}||
{{#ifeq:{{{City5|}}}||
|{{{City5|}}}
}}
|{{{City4|}}}
}}
|{{{City3|}}}
}}
|{{{City2|}}}
}}
|{{{City|}}}
}}
|Volume={{#ifeq:{{{Volume|}}}||
{{#ifeq:{{{Volume2|}}}||
{{#ifeq:{{{Volume3|}}}||
{{#ifeq:{{{Volume4|}}}||
{{#ifeq:{{{Volume5|}}}||
|{{{Volume5|}}}
}}
|{{{Volume4|}}}
}}
|{{{Volume3|}}}
}}
|{{{Volume2|}}}
}}
|{{{Volume|}}}
}}
|Author={{{Author|}}}
|Author={{{Author|}}}
|SecondaryTitle={{{SecondaryTitle|}}}
|SecondaryTitle={{{SecondaryTitle|}}}
Line 246: Line 62:
|Title={{{Title|}}}
|Title={{{Title|}}}
|Journal={{{Journal|}}}  
|Journal={{{Journal|}}}  
}} <!--end FormattedReferenceTemplate call-->
|ConferenceName={{{ConferenceName|}}}
|,,|xx|[[HasFormattedReference::xx]]
|Publisher={{#arraymap:
|}}
    {{{Publisher|}}};{{{Publisher2|}}};{{{Publisher3|}}};{{{Publisher4|}}};{{{Publisher5|}}}
    |;|xx|{{#ifeq:xx|||xx}}
    |}}
|ISBN={{#arraymap:
    {{{ISBN|}}};{{{ISBN2|}}};{{{ISBN3|}}}
    |;|xx|{{#ifeq:xx|||xx}}
    |}}
|Editor={{#arraymap:
    {{{Editor|}}};{{{Editor2|}}};{{{Editor3|}}}
    |;|xx|{{#ifeq:xx|||xx}}
    |}}
|Pages={{#arraymap:
    {{{Pages|}}};{{{Pages2|}}};{{{Pages3|}}};{{{Pages4|}}}
    |;|xx|{{#ifeq:xx|||xx}}
    |}}
|SeriesTitle={{#arraymap:
    {{{SeriesTitle|}}};{{{SeriesTitle2|}}}
    |;|xx|{{#ifeq:xx|||xx}}
    |}}
|City={{#arraymap:
    {{{City|}}};{{{City2|}}};{{{City3|}}};{{{City4|}}};{{{City5|}}}
    |;|xx|{{#ifeq:xx|||xx}}
    |}}
|Volume={{#arraymap:
    {{{Volume|}}};{{{Volume2|}}};{{{Volume3|}}};{{{Volume4|}}};{{{Volume5|}}};{{{Volume6|}}}
    |;|xx|{{#ifeq:xx|||xx}}
    |}}
}}


{{#ask:[[HasReference::{{PAGENAME}}]] OR [[HasKeyReference::{{PAGENAME}}]]
{{#ask:[[HasReference::{{PAGENAME}}]] OR [[HasKeyReference::{{PAGENAME}}]]
Line 256: Line 99:
|intro=This reference is used on the following pages:
|intro=This reference is used on the following pages:
}}For an overview of all references see [[All references table overview]] or [[All references overview]] (citation format)
}}For an overview of all references see [[All references table overview]] or [[All references overview]] (citation format)
[[Category:Reference]]
[[HasPageName::{{PAGENAME}}| ]]


<!-- publication without a reference belong tot the category IMAGE publication.
The category Reference is a subset of IMAGE publication-->
{{#ifeq:
{{#ask:[[HasReference::{{PAGENAME}}]] OR [[HasKeyReference::{{PAGENAME}}]]
  |format=count
}}|0|[[Category:IMAGE publication]]|[[Category:Reference]]}}
</includeonly>
</includeonly>

Latest revision as of 09:58, 11 March 2020

This is the "ReferenceTemplate" template. It should be called in the following format:

{{ReferenceTemplate
|Author=
|Year=
|Title=
|DOI=
|PublicationType=
|Editor=
|Journal=
|Volume=
|Issue=
|Pages=
|Conference=
|HasFormattedReference=
}}

Edit the page to see the template text.