Template:Library infobox work: Difference between revisions

Template page
m (Testing automatic linking to pages without [[ ]])
(switching Library Work and Library Infobox Work (first was redirect, second was template: now switched))
Tag: New redirect
 
(30 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Infobox
#REDIRECT [[Template:Library work]]
| bodyclass = vcard
 
| abovestyle = padding-top:0; padding-bottom:0;
| above = <div style="padding-top:0.3em; padding-bottom:0.3em; line-height: 1;"><div style="display:inline;" class="fn org">{{if empty|{{{title|}}}|{{BASEPAGENAME}}}}</div></div>
 
| subheaderstyle = font-size:100%;
| subheader = {{{subtitle|}}}
 
| imageclass = logo
| imagestyle = padding-top:.4em;padding-bottom:.3em;
| image = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|upright={{{image_upright|0.8}}}|alt={{{image_alt|}}}|size={{{image_size|}}}}}
| caption = {{{caption|}}}
 
| headerstyle = line-height: 0.8em; padding-top:0.5em; padding-bottom:0;
| labelstyle = line-height:1.3em;
| datastyle = line-height:1.3em;
 
| label1  = Written by
|  data1  = {{#ifexist:{{{written by|}}}|[[{{{written by}}}]]|{{{written by}}}}}
 
| label2  = Written in
|  data2  = {{{written in|}}}
 
| label3  = First published
|  data3  = {{{published|}}}
 
| label4  = Type
|  data4  = {{{type|}}}
 
| label5  = Source
|  data5  = {{{source|}}}
 
| label6 = Audiobook
|  data6 = {{{audiobook|}}}
}}{{#ifeq:{{{display_title|}}}|yes|{{DISPLAYTITLE:{{#if:{{{title|}}}|''{{{title}}}''|''{{PAGENAME}}''}}{{#if:{{{written by|}}}|, by {{{written by|}}}}}}}}}
<noinclude>
How to use this template:
<nowiki>
{{Library infobox work
| image =
| image_size =
| image_upright =
| image_alt =
| caption =
| title =
| written by =
| written in =
| published =
| type =
| source =
| audiobook =
| display_title =
}}
</nowiki>
Add "yes" to parameter "display_title" to produce a page title in the format: ''Title of work'', by Author
<templatedata>
{
"params": {
"title": {
"label": "Title",
"description": "Title of the work",
"type": "string",
"suggested": true
},
"_subheader": {},
"image": {
"label": "Image",
"description": "Book cover",
"type": "wiki-file-name",
"suggested": true
},
"image_upright": {},
"image_alt": {},
"image_size": {},
"caption": {
"label": "Caption",
"description": "Caption of the image, usually for information about the edition of the cover",
"type": "string"
},
"written by": {
"label": "Written by",
"description": "Author of the source work",
"type": "string",
"suggested": true
},
"written in": {
"label": "Written in",
"description": "Date or period the work was written",
"type": "date",
"suggested": true
},
"published": {
"label": "First published",
"description": "Date the book was first published",
"type": "date",
"suggested": true
},
"type": {
"label": "Type",
"description": "Type of work",
"example": "Book, pamphlet, leaflet, speech, video",
"type": "string",
"suggested": true
},
"source": {
"label": "Source",
"description": "URL of the work",
"type": "url",
"suggested": true
},
"audiobook": {
"label": "Audiobook",
"description": "URL of an audiobook reading of the work",
"type": "url",
"suggested": true
},
"display_title": {
"label": "Full display title",
"description": "Adds title in style \"Work (in italics), by Author\"",
"example": "Write \"yes\" to activate the title styling",
"type": "string",
"autovalue": "",
"suggested": true
}
},
"description": "Adds a small infobox with information for Library works",
"paramOrder": [
"title",
"image",
"caption",
"written by",
"written in",
"published",
"type",
"source",
"audiobook",
"display_title",
"_subheader",
"image_upright",
"image_alt",
"image_size"
]
}
</templatedata></noinclude>

Latest revision as of 17:54, 29 September 2023