Template:Work: Difference between revisions

From Sax.Wiki
Jump to navigation Jump to search
No edit summary
Tag: Manual revert
Try using HTML table
 
Line 2: Line 2:
{{#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)}}
{{#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)}}
{{#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}}
{{#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}}
</noinclude>
</noinclude><includeonly>{{#cargo_store:_table=works}}<templatestyles src="Work/styles.css" />
<includeonly>
<table class="works-infobox">
<templatestyles src="Work/styles.css" />
<tr><th colspan="2" class="infobox-title">{{{title|{{PAGENAME}}}}}</th></tr>{{#if: {{{subtitle|}}}
{{#cargo_store:_table=works}}
  | <tr><td colspan="2" class="infobox-subtitle">{{{subtitle}}}</td></tr>
{| class="works-infobox"
}}{{#if: {{{aliases|}}}
! colspan="2" class="infobox-title" | {{{title|{{PAGENAME}}}}}
  | <tr><th>Alias(es)</th><td>{{{aliases}}}</td></tr>
{{#if: {{{subtitle|}}} |
}}{{#if: {{{compose_start_date|}}}
{{!}}-
  | <tr><th>Composition Started</th><td>{{{compose_start_date}}}</td></tr>
{{!}} colspan="2" class="infobox-subtitle" {{!}} {{{subtitle}}}
}}{{#if: {{{compose_end_date|}}}
}}
  | <tr><th>Composition Completed</th><td>{{{compose_end_date}}}</td></tr>
{{#if: {{{aliases|}}} |
}}{{#if: {{{catalog_ids|}}}
{{!}}-
  | <tr><th>Catalog ID(s)</th><td>{{{catalog_ids}}}</td></tr>
! Alias(es)
}}<tr><th>Composer(s)</th><td>{{#arraymap:{{{composers|}}}|,|@@@|[[@@@]]}}</td></tr>{{#if: {{{librettists|}}}
{{!}} {{{aliases}}}
  | <tr><th>Librettist(s)</th><td>{{#arraymap:{{{librettists}}}|,|@@@|[[@@@]]}}</td></tr>
}}
}}{{#if: {{{authors|}}}
{{#if: {{{compose_start_date|}}} |
  | <tr><th>Author(s)</th><td>{{#arraymap:{{{authors}}}|,|@@@|[[@@@]]}}</td></tr>
{{!}}-
}}{{#if: {{{commissioners|}}}
! Composition Started
  | <tr><th>Commissioner(s)</th><td>{{#arraymap:{{{commissioners}}}|,|@@@|[[@@@]]}}</td></tr>
{{!}} {{{compose_start_date}}}
}}{{#if: {{{dedicatees|}}}
}}
  | <tr><th>Dedicatee(s)</th><td>{{#arraymap:{{{dedicatees}}}|,|@@@|[[@@@]]}}</td></tr>
{{#if: {{{compose_end_date|}}} |
}}{{#if: {{{publishers|}}}
{{!}}-
  | <tr><th>Publisher(s)</th><td>{{#arraymap:{{{publishers}}}|,|@@@|[[@@@]]}}</td></tr>
! Composition Completed
}}{{#if: {{{compose_date|}}}
{{!}} {{{compose_end_date}}}
  | <tr><th>Composed</th><td>{{{compose_date}}}</td></tr>
}}
}}{{#if: {{{genres|}}}
{{#if: {{{catalog_ids|}}} |
  | <tr><th>Genre(s)</th><td>{{{genres}}}</td></tr>
{{!}}-
}}{{#if: {{{difficulty|}}}
! Catalog ID(s)
  | <tr><th>Difficulty</th><td>{{{difficulty}}}</td></tr>
{{!}} {{{catalog_ids}}}
}}{{#if: {{{duration|}}}
}}
  | <tr><th>Duration</th><td>{{{duration}}}</td></tr>
|-
}}</table>
! Composer(s)
| {{#arraymap:{{{composers|}}}|,|@@@|[[@@@]]}}
{{#if: {{{librettists|}}} |
{{!}}-
! Librettist(s)
{{!}} {{#arraymap:{{{librettists}}}|,|@@@|[[@@@]]}}
}}
{{#if: {{{authors|}}} |
{{!}}-
! Author(s)
{{!}} {{#arraymap:{{{authors}}}|,|@@@|[[@@@]]}}
}}
{{#if: {{{commissioners|}}} |
{{!}}-
! Commissioner(s)
{{!}} {{#arraymap:{{{commissioners}}}|,|@@@|[[@@@]]}}
}}
{{#if: {{{dedicatees|}}} |
{{!}}-
! Dedicatee(s)
{{!}} {{#arraymap:{{{dedicatees}}}|,|@@@|[[@@@]]}}
}}
{{#if: {{{publishers|}}} |
{{!}}-
! Publisher(s)
{{!}} {{#arraymap:{{{publishers}}}|,|@@@|[[@@@]]}}
}}
{{#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.