Template:Library infobox work: Difference between revisions

Template page
m (Made title and subtitle explicit in model)
(Changed parameters from "Written by" to Author, changed "published" to "published_date" and "published_location". Will be batch editing those changes on pages that call this template)
Line 17: Line 17:
| datastyle = line-height:1.3em;
| datastyle = line-height:1.3em;


| label1  = Written by
| label1  = Author
|  data1  = {{#ifexist:{{{written by|}}}|[[{{{written by}}}]]|{{{written by}}}}}
|  data1  = {{#ifexist:{{{author|}}}|[[{{{author}}}]]|{{{author|}}}}}


| label2 = Written in
| label3 = Written in
data2 = {{{written in|}}}
data3 = {{{written in|}}}


| label3 = First published
| label4 = First published
data3 = {{{published|}}}
data4 = {{{published_date|}}}{{#if:{{{published_location|}}}|<br/>{{{published_location}}}}}


| label4 = Type
| label5 = Type
data4 = {{{type|}}}
data5 = {{{type|}}}


| label5 = ISBN
| label6 = ISBN
data5 = {{{isbn|}}}
data6 = {{{isbn|}}}


| label6 = Source
| label7 = Source
data6 = {{{source|}}}
data7 = {{{source|}}}


| label7 = Audiobook
| label8 = Audiobook
data7 = {{{audiobook|}}}
data8 = {{{audiobook|}}}
}}{{#ifeq:{{{display_title|}}}|yes|{{DISPLAYTITLE:{{#if:{{{title|}}}|''{{{title}}}''|''{{PAGENAME}}''}}{{#if:{{{written by|}}}|, by {{{written by|}}}}}}}}}
}}{{#ifeq:{{{display_title|}}}|yes|{{DISPLAYTITLE:{{#if:{{{title|}}}|''{{{title}}}''|''{{PAGENAME}}''}}{{#if:{{{written by|}}}|, by {{{written by|}}}}}}}}}<noinclude>
<noinclude>
How to use this template:
How to use this template:
  <nowiki>
  <nowiki>
Line 49: Line 48:
| image_alt =
| image_alt =
| caption =
| caption =
| written by =
| author =
| written in =
| written in =
| published =  
| published_date =
| published_location =  
| type =
| type =
| source =  
| source =  

Revision as of 02:53, 23 January 2023

Library infobox work

How to use this template:

{{Library infobox work
| title = 
| subtitle = 
| image =
| image_size =
| image_upright =
| image_alt =
| caption =
| author =
| written in =
| published_date = 
| published_location = 
| type =
| source = 
| audiobook = 
| display_title =
}}

Add "yes" to parameter "display_title" to produce a page title in the format: Title of work, by Author

Adds a small infobox with information for Library works

Template parameters

ParameterDescriptionTypeStatus
Titletitle

Title of the work

Stringsuggested
Imageimage

Book cover

Filesuggested
Captioncaption

Caption of the image, usually for information about the edition of the cover

Stringoptional
Written bywritten by

Author of the source work

Stringsuggested
Written inwritten in

Date or period the work was written

Datesuggested
First publishedpublished

Date the book was first published

Datesuggested
Typetype

Type of work

Example
Book, pamphlet, leaflet, speech, video
Stringsuggested
ISBNisbn

ISBN number of the work

Numbersuggested
Sourcesource

URL of the work

URLsuggested
Audiobookaudiobook

URL of an audiobook reading of the work

URLsuggested
Full display titledisplay_title

Adds title in style "Work (in italics), by Author"

Example
Write "yes" to activate the title styling
Auto value
Stringsuggested
_subheader_subheader

no description

Unknownoptional
image_uprightimage_upright

no description

Unknownoptional
image_altimage_alt

no description

Unknownoptional
image_sizeimage_size

no description

Unknownoptional