Difference between revisions of "Template:Infobox"

From
Jump to: navigation, search
m
(Syntax)
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>
+
=Function=
A succinct infobox for individual pages.
 
  
Parameters:
+
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]].
<!-- Leave empty if irrelevant -->
+
 
 +
=Syntax=
 +
 
 +
Parameters. Copy-paste to the top of your page (or immediately below the first heading) and fill in the balnks:
 
  <nowiki>
 
  <nowiki>
 
{{Infobox
 
{{Infobox
| project = (Should match an existing category.)
+
| project = (Plain text. Should match an existing category)
| deliverable-nr = (Any ID format, eg. D1.2.)
+
| 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)
 
| submission-date = (ISO 8601 format, ie. YYYY-MM-DD)
| type = (Should match an existing category.)
+
| type = (Plain text. Should match an existing category.)
| pdf = (Wikilink to PDF file.)
+
| url = (Wikilink to copy of PDF file on the wiki.)
| zenodo = (URL to Zenodo page.)
+
| zenodo = (Plain URL to Zenodo page.)
| url = (Document URL.)
 
 
}}
 
}}
 
</nowiki>
 
</nowiki>
Output: →
 
</noinclude>
 
  
 +
=Wikitext=
 +
''Transcluded content starts here.''
 +
<onlyinclude>
 
<div class="infobox">
 
<div class="infobox">
 
<div class="infobox-title">{{#if:{{{deliverable-nr|}}} | {{{deliverable-nr}}} {{PAGENAME}} | {{PAGENAME}} }}</div>
 
<div class="infobox-title">{{#if:{{{deliverable-nr|}}} | {{{deliverable-nr}}} {{PAGENAME}} | {{PAGENAME}} }}</div>
<div class="infobox-image">{{#if:{{{image|}}} | [[File:{{{image}}}|200px]] | [[File:ENVRI-community-logo.jpg|200px]] }}</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>
 
<table>
 
{{#if:{{{project|}}} |
 
{{#if:{{{project|}}} |
Line 43: Line 47:
 
</tr>|}}
 
</tr>|}}
 
</table>
 
</table>
<p align="center">[{{{url}}} Link] | [File:{{{pdf}}} PDF | [{{{zenodo}}} Zenodo]</p>
+
<p align="center"><strong>
 +
    {{#if:{{{url|}}}|[{{{url}}} PDF]| PDF}} |
 +
    {{#if:{{{zenodo|}}}| [{{{zenodo}}} Zenodo]| Zenodo}}
 +
</strong></p>
 
<p align="center">[[#metadata|Document metadata]]</p>
 
<p align="center">[[#metadata|Document metadata]]</p>
 
</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