Template:Work: Difference between revisions

From Sax.Wiki
Jump to navigation Jump to search
Second try's the charm
Tag: Reverted
Try using HTML table
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
{{#template_params:
{{#template_params:title (label=Title)|aliases (label=Alias(es))|subtitle (label=Subtitle)|compose_start_date (label=Composition Started)|compose_end_date (label=Composition Completed)|catalog_ids (label=Catalog ID(s))|composers (label=Composer(s))|librettists (label=Librettist(s))|authors (label=Author(s))|commissioners (label=Commissioner(s))|dedicatees (label=Dedicatee(s))|publishers (label=Publisher(s))|compose_date (label=Composed)|genres (label=Genre(s))|difficulty (label=Difficulty)|duration (label=Duration)}}
title (label=Title)|
{{#cargo_declare:_table=works|title=String|aliases=List (,) of String|subtitle=String|compose_start_date=Start date|compose_end_date=End date|catalog_ids=List (,) of String|composers=List (,) of Page|librettists=List (,) of Page|authors=List (,) of Page|commissioners=List (,) of Page|dedicatees=List (,) of Page|publishers=List (,) of Page|compose_date=Date|genres=List (,) of String|difficulty=Rating|duration=String}}
aliases (label=Alias(es))|
</noinclude><includeonly>{{#cargo_store:_table=works}}<templatestyles src="Work/styles.css" />
subtitle (label=Subtitle)|
<table class="works-infobox">
compose_start_date (label=Composition Started)|
<tr><th colspan="2" class="infobox-title">{{{title|{{PAGENAME}}}}}</th></tr>{{#if: {{{subtitle|}}}
compose_end_date (label=Composition Completed)|
  | <tr><td colspan="2" class="infobox-subtitle">{{{subtitle}}}</td></tr>
catalog_ids (label=Catalog ID(s))|
}}{{#if: {{{aliases|}}}
composers (label=Composer(s))|
  | <tr><th>Alias(es)</th><td>{{{aliases}}}</td></tr>
librettists (label=Librettist(s))|
}}{{#if: {{{compose_start_date|}}}
authors (label=Author(s))|
  | <tr><th>Composition Started</th><td>{{{compose_start_date}}}</td></tr>
commissioners (label=Commissioner(s))|
}}{{#if: {{{compose_end_date|}}}
dedicatees (label=Dedicatee(s))|
  | <tr><th>Composition Completed</th><td>{{{compose_end_date}}}</td></tr>
publishers (label=Publisher(s))|
}}{{#if: {{{catalog_ids|}}}
compose_date (label=Composed)|
  | <tr><th>Catalog ID(s)</th><td>{{{catalog_ids}}}</td></tr>
genres (label=Genre(s))|
}}<tr><th>Composer(s)</th><td>{{#arraymap:{{{composers|}}}|,|@@@|[[@@@]]}}</td></tr>{{#if: {{{librettists|}}}
difficulty (label=Difficulty)|
  | <tr><th>Librettist(s)</th><td>{{#arraymap:{{{librettists}}}|,|@@@|[[@@@]]}}</td></tr>
duration (label=Duration)
}}{{#if: {{{authors|}}}
}}
  | <tr><th>Author(s)</th><td>{{#arraymap:{{{authors}}}|,|@@@|[[@@@]]}}</td></tr>
 
}}{{#if: {{{commissioners|}}}
{{#cargo_declare:_table=works|
  | <tr><th>Commissioner(s)</th><td>{{#arraymap:{{{commissioners}}}|,|@@@|[[@@@]]}}</td></tr>
title=String|
}}{{#if: {{{dedicatees|}}}
aliases=List (,) of String|
  | <tr><th>Dedicatee(s)</th><td>{{#arraymap:{{{dedicatees}}}|,|@@@|[[@@@]]}}</td></tr>
subtitle=String|
}}{{#if: {{{publishers|}}}
compose_start_date=Start date|
  | <tr><th>Publisher(s)</th><td>{{#arraymap:{{{publishers}}}|,|@@@|[[@@@]]}}</td></tr>
compose_end_date=End date|
}}{{#if: {{{compose_date|}}}
catalog_ids=List (,) of String|
  | <tr><th>Composed</th><td>{{{compose_date}}}</td></tr>
composers=List (,) of Page|
}}{{#if: {{{genres|}}}
librettists=List (,) of Page|
  | <tr><th>Genre(s)</th><td>{{{genres}}}</td></tr>
authors=List (,) of Page|
}}{{#if: {{{difficulty|}}}
commissioners=List (,) of Page|
  | <tr><th>Difficulty</th><td>{{{difficulty}}}</td></tr>
dedicatees=List (,) of Page|
}}{{#if: {{{duration|}}}
publishers=List (,) of Page|
  | <tr><th>Duration</th><td>{{{duration}}}</td></tr>
compose_date=Date|
}}</table>
genres=List (,) of String|
difficulty=Rating|
duration=String
}}
</noinclude>
 
<includeonly>
{{#cargo_store:_table=works}}
 
{| class="infobox"
! colspan="2" | {{{title}}}
 
{{#if:{{{subtitle|}}}|
{{!}}-
! Subtitle
{{!}} {{{subtitle}}}
}}
 
{{#if:{{{aliases|}}}|
{{!}}-
! Also known as
{{!}} {{{aliases}}}
}}
 
{{!}}-
! Composer(s)
{{!}} {{{composers}}}
 
{{#if:{{{librettists|}}}|
{{!}}-
! Librettist(s)
{{!}} {{{librettists}}}
}}
 
{{#if:{{{authors|}}}|
{{!}}-
! Author(s)
{{!}} {{{authors}}}
}}
 
{{#if:{{{commissioners|}}}|
{{!}}-
! Commissioner(s)
{{!}} {{{commissioners}}}
}}
 
{{#if:{{{dedicatees|}}}|
{{!}}-
! Dedicatee(s)
{{!}} {{{dedicatees}}}
}}
 
{{#if:{{{publishers|}}}|
{{!}}-
! Publisher(s)
{{!}} {{{publishers}}}
}}
 
{{#if:{{{catalog_ids|}}}|
{{!}}-
! Catalog ID(s)
{{!}} {{{catalog_ids}}}
}}
 
{{#if:{{{compose_start_date|}}}|
{{!}}-
! Composition started
{{!}} {{{compose_start_date}}}
}}
 
{{#if:{{{compose_end_date|}}}|
{{!}}-
! Completed
{{!}} {{{compose_end_date}}}
}}
 
{{#if:{{{compose_date|}}}|
{{!}}-
! Composed
{{!}} {{{compose_date}}}
}}
 
{{#if:{{{genres|}}}|
{{!}}-
! Genre(s)
{{!}} {{{genres}}}
}}
 
{{#if:{{{difficulty|}}}|
{{!}}-
! Difficulty
{{!}} {{{difficulty}}}
}}
 
{{#if:{{{duration|}}}|
{{!}}-
! Duration
{{!}} {{{duration}}}
}}
|}
 
[[Category:Works]]
[[Category:Works]]
</includeonly>
</includeonly>

Latest revision as of 03:27, 8 July 2026

This is the "Work" template.

It should be called in the following format:

{{Work
|title=
|aliases=
|subtitle=
|compose_start_date=
|compose_end_date=
|catalog_ids=
|composers=
|librettists=
|authors=
|commissioners=
|dedicatees=
|publishers=
|compose_date=
|genres=
|difficulty=
|duration=
}}

Edit the page to see the template text.

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