Difference between revisions of "Template:Infobox"

From
Jump to: navigation, search
m
(Syntax)
 
(55 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<div class="infobox" style="width:240px;">
+
=Function=
<div class="infobox-title">{{{title|{{PAGENAME}}}}}</div>{{#if:{{{image|}}}|
+
 
<div class="infobox-image">[[File:{{{image}}}|200px]]</div>}}
+
A succinct infobox to be used at the very top of individual pages. Meant to give the reader a quick context summary of the page. The full metadata is then given at the bottom of the page using [[Template:DocumentMetadata]].
<table>{{#if:{{{project|}}}|<tr>
+
 
 +
=Syntax=
 +
 
 +
Parameters. Copy-paste to the top of your page (or immediately below the first heading) and fill in the balnks:
 +
<nowiki>
 +
{{Infobox
 +
| project = (Plain text. Should match an existing category)
 +
| image = (Wikilink. Looks for the project logo, and if nothing is found, defaults to ENVRI Community logo)
 +
| deliverable-nr = (Any format, eg. D1.2.)
 +
| submission-date = (ISO 8601 format, ie. YYYY-MM-DD)
 +
| type = (Plain text. Should match an existing category.)
 +
| url = (Wikilink to copy of PDF file on the wiki.)
 +
| zenodo = (Plain URL to Zenodo page.)
 +
}}
 +
</nowiki>
 +
 
 +
=Wikitext=
 +
''Transcluded content starts here.''
 +
<onlyinclude>
 +
<div class="infobox">
 +
<div class="infobox-title">{{#if:{{{deliverable-nr|}}} | {{{deliverable-nr}}} {{PAGENAME}} | {{PAGENAME}} }}</div>
 +
<div class="infobox-image">{{#if:{{{image|}}} | [[File:{{{image}}}|200px]] |
 +
{{#ifexist:[[File:{{{project}}}_logo.jpg]]|[[File:{{{project}}}_logo.jpg]]|[[File:ENVRI-community-logo.jpg|200px]]}} }}</div>
 +
<table>
 +
{{#if:{{{project|}}} |
 +
<tr>
 
     <th>Project</th>
 
     <th>Project</th>
     <td>{{{project}}}</td>
+
     <td>[[:Category:{{{project}}}{{!}}{{{project}}}]]</td>
<tr>}}{{#if:{{{deliverable-nr|}}}|<tr>
+
</tr>|}}
 +
{{#if:{{{deliverable-nr|}}} |
 +
<tr>
 
     <th>Deliverable nr</th>
 
     <th>Deliverable nr</th>
 
     <td>{{{deliverable-nr}}}</td>
 
     <td>{{{deliverable-nr}}}</td>
</tr>}}{{#if:{{{submission-date|}}}|<tr>
+
</tr>|}}
 +
{{#if:{{{submission-date|}}} |
 +
<tr>
 
     <th>Submission date</th>
 
     <th>Submission date</th>
 
     <td>{{{submission-date}}}</td>
 
     <td>{{{submission-date}}}</td>
</tr>}}{{#if:{{{param2|}}}|<tr>
+
</tr>}}
     <th>Parameter 2</th>
+
{{#if:{{{type|}}} |
     <td>{{{param2}}}</td>
+
<tr>
</tr>}}{{#if:{{{param3|}}}|<tr>
+
     <th>Type</th>
    <th>Parameter 3</th>
+
     <td>[[:Category:{{ucfirst:{{lc:{{{type}}}}}}}|{{ucfirst:{{lc:{{{type}}}}}}}]]</td>
    <td>{{{param3}}}</td>
+
</tr>|}}
</tr>}}{{#if:{{{param4|}}}|<tr>
+
</table>
    <th>Parameter 4</th>
+
<p align="center"><strong>
    <td>{{{param4}}}</td>
+
    {{#if:{{{url|}}}|[{{{url}}} PDF]| PDF}} |
</tr>}}{{#if:{{{param5|}}}|<tr>
+
    {{#if:{{{zenodo|}}}| [{{{zenodo}}} Zenodo]| Zenodo}}
    <th>Parameter 5</th>
+
</strong></p>
    <td>{{{param5}}}</td>
+
<p align="center">[[#metadata|Document metadata]]</p>
</tr>}}</table>
 
 
</div>
 
</div>
 +
</onlyinclude>

Latest revision as of 14:04, 12 April 2021

Function[edit]

A succinct infobox to be used at the very top of individual pages. Meant to give the reader a quick context summary of the page. The full metadata is then given at the bottom of the page using Template:DocumentMetadata.

Syntax[edit]

Parameters. Copy-paste to the top of your page (or immediately below the first heading) and fill in the balnks:

{{Infobox
| project = (Plain text. Should match an existing category)
| image = (Wikilink. Looks for the project logo, and if nothing is found, defaults to ENVRI Community logo)
| deliverable-nr = (Any format, eg. D1.2.)
| submission-date = (ISO 8601 format, ie. YYYY-MM-DD)
| type = (Plain text. Should match an existing category.)
| url = (Wikilink to copy of PDF file on the wiki.)
| zenodo = (Plain URL to Zenodo page.)
}}

Wikitext[edit]

Transcluded content starts here.

Infobox
ENVRI-community-logo.jpg

PDF | Zenodo

Document metadata