Jump to content

Module:Format work/doc

From Wikipedia, the free encyclopedia

Usage

[edit]

This module returns details supplied about a creative work, formatted inline with MOS:DISCOGRAPHY or MOS:FILMOGRAPHY of MOS:WORKS, and suitable for display in an article list.

{{#invoke:Format work|main
 | act         = <!-- required; "Pink Floyd" or "[[Pink Floyd (band)|Pink Floyd]]" -->
 | title       = <!-- required; "The Dark Side of the Moon" or "[[The Dark Side of the Moon (album)|The Dark Side of the Moon]]" -->
 | type        = <!-- "minor" to override the default "major" -->
 | label       = <!-- for a musical release; "Harvest Records" or "[[Harvest Records|Harvest]]" -->
 | distributor = <!-- for a film release; "Lionsgate Studios" or "[[Lionsgate Studios|Lionsgate]]" -->
 | year        = <!-- "1973" -->
 | month       = <!-- "3" -->
 | day         = <!-- "1" -->
 | page        = <!-- only if |day= is provided; "Pink Floyd discography" -->
 | notes       = <!-- "There is no dark side in the moon, really. Matter of fact, it's all dark." -->
}}

act and title

[edit]

Required

  • |act= should be an artist, group, ensemble, actor etc.
  • |title= should be the title of the creative work

Both values may be plain text or wikilinks; plain text will be automatically linked if a suitable matching article exists.

For example:

{{#invoke:Format work|main
 | act   = Pink Floyd
 | title = The Dark Side of the Moon
}}

Returns: Pink Floyd: The Dark Side of the Moon

And for example:

{{#invoke:Format work|main
 | act   = [[Pink Floyd (band)|Pink Floyd]]
 | title = [[The Dark Side of the Moon (album)|The Dark Side of the Moon]]
}}

Returns: Pink Floyd: The Dark Side of the Moon

type

[edit]

By default, the |type= of the work is treated as "major"; use |type=minor to override this. See MOS:NAT for guidance.

{{#invoke:Format work|main
 | act   = Pink Floyd
 | title = [[Eclipse (Pink Floyd song)|Eclipse]]
 | type  = minor
}}

Returns: Pink Floyd: "Eclipse"

label or distributor

[edit]

For musical works, |label= may be used, and |distributor= may be used for films, if suitable.

{{#invoke:Format work|main
 | act   = Pink Floyd
 | title = The Dark Side of the Moon
 | label = [[Harvest Records|Harvest]]
}}

Returns: Pink Floyd: The Dark Side of the Moon (Harvest)

year and month

[edit]

Providing a date must include a |year=; if no year is provided, |month= and |day= will be ignored.

{{#invoke:Format work|main
 | act   = Pink Floyd
 | title = The Dark Side of the Moon
 | year  = 1973
}}

Returns: Pink Floyd: The Dark Side of the Moon (1973)

{{#invoke:Format work|main
 | act   = Pink Floyd
 | title = The Dark Side of the Moon
 | year  = 1973
 | month = 3
}}

Returns: Pink Floyd: The Dark Side of the Moon (March 1973)

day and page

[edit]

If the |day= is provided, the date format will be automatically established via Module:Get article date format, which will return its default (day month year) unless an article |page= is provided. The article will be probed for explicit date formatting requirements established by use of {{use dmy dates}} or {{use mdy dates}}, or for implicit expectations due to an established English variant. The practical upshot should be for formatting lists of works on articles with established date formats, just provide the {{FULLPAGENAME}}.

{{#invoke:Format work|main
 | act   = Pink Floyd
 | title = The Dark Side of the Moon
 | year  = 1973
 | month = 3
 | day   = 1
}}

Returns: Pink Floyd: The Dark Side of the Moon (1 March 1973)

{{#invoke:Format work|main
 | act   = Captain Beefheart
 | title = Trout Mask Replica
 | year  = 1969
 | month = 6
 | day   = 16
 | page  = Captain Beefheart
}}

Returns: Captain Beefheart: Trout Mask Replica (June 16, 1969)

notes

[edit]
{{#invoke:Format work|main
 | act   = Pink Floyd
 | title = The Dark Side of the Moon
 | notes = There is no dark side in the moon, really. Matter of fact, it's all dark.
}}

Returns: Pink Floyd: The Dark Side of the Moon – There is no dark side in the moon, really. Matter of fact, it's all dark.

Complete examples

[edit]
{{#invoke:Format work|main
 | act   = Pink Floyd
 | title = The Dark Side of the Moon
 | label = [[Harvest Records|Harvest]]
 | year  = 1973
 | month = 3
 | day   = 1
 | page  = Pink Floyd
 | notes = There is no dark side in the moon, really. Matter of fact, it's all dark.
}}

Returns: Pink Floyd: The Dark Side of the Moon (Harvest, 1 March 1973) – There is no dark side in the moon, really. Matter of fact, it's all dark.

{{#invoke:Format work|main
 | act   = Captain Beefheart
 | title = Trout Mask Replica
 | label = [[Straight Records|Straight]]
 | year  = 1969
 | month = 6
 | day   = 16
 | page  = Captain Beefheart
 | notes = produced by [[Frank Zappa]]
}}

Returns: Captain Beefheart: Trout Mask Replica (Straight, June 16, 1969) – produced by Frank Zappa

Alarming messages

[edit]

Alarming messages will be returned if values for the required |act= and |title= are not provided.