Template:Infobox book simple: Difference between revisions
More actions
Created page with "{{Infobox | name = Infobox book simple | bodyclass = vcard | title = {{{title|{{PAGENAME}}}}} | titleclass = fn | image = {{#if:{{{cover|}}}|[[File:{{{cover}}}|frameless|upright=1|alt={{{alt|Cover art}}}]]}} | caption = {{{caption|}}} | label1 = Author | data1 = {{{author|}}} | label2 = Published | data2 = {{{year|}}} }}<noinclude> {{Documentation}} </noinclude>" |
No edit summary |
||
| Line 12: | Line 12: | ||
| label2 = Published | | label2 = Published | ||
| data2 = {{{year|}}} | | data2 = {{{year|}}} | ||
}}<noinclude> | |||
}}<noinclude> | }}<noinclude> | ||
{{Documentation}} | {{Documentation}} | ||
<templatedata> | |||
{ | |||
"description": "A concise infobox for books, showing title, cover art, author and year of publication.", | |||
"format": "block", | |||
"params": { | |||
"title": { | |||
"label": "Title", | |||
"description": "The book's title. If left blank, the article title is used.", | |||
"type": "string", | |||
"suggested": true | |||
}, | |||
"cover": { | |||
"label": "Cover art (file name)", | |||
"description": "Bare filename of the book cover image, without the 'File:' prefix.", | |||
"type": "wiki-file-name", | |||
"example": "Frankenstein 1818 edition title page.jpg", | |||
"suggested": true | |||
}, | |||
"alt": { | |||
"label": "Cover alt text", | |||
"description": "Alternative text for the cover image.", | |||
"type": "string" | |||
}, | |||
"caption": { | |||
"label": "Cover caption", | |||
"description": "A caption shown beneath the cover image.", | |||
"type": "string" | |||
}, | |||
"author": { | |||
"label": "Author", | |||
"description": "Author of the book. Can be a wikilink.", | |||
"type": "content", | |||
"required": true | |||
}, | |||
"year": { | |||
"label": "Publication year", | |||
"description": "The year the book was first published.", | |||
"type": "number", | |||
"example": "1818", | |||
"required": true | |||
} | |||
} | |||
} | |||
</templatedata> | |||
</noinclude> | </noinclude> | ||
Latest revision as of 09:24, 24 April 2026
}}
Usage
This template produces a standard right-aligned infobox summarising key information about a book: its title, cover art, author, and year of publication.
Blank syntax
{{Infobox book simple
| title =
| cover =
| alt =
| caption =
| author =
| year =
}}
Example
{{Infobox book simple
| title = Frankenstein
| cover = Frankenstein 1818 edition title page.jpg
| alt = Title page of the 1818 edition
| caption = First edition title page (1818)
| author = [[Mary Shelley]]
| year = 1818
}}
Parameters
- title
- The book's title. Defaults to the page name if left blank.
- cover
- Bare filename of the cover image (e.g.
Example.jpg), without theFile:prefix. - alt
- Alt text for the cover image, for accessibility.
- caption
- Caption shown beneath the cover (typically describing the edition).
- author
- Author of the book. May be wikilinked.
- year
- Year the book was first published (e.g.
1818).
TemplateData
A concise infobox for books, showing title, cover art, author and year of publication.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Title | title | The book's title. If left blank, the article title is used.
| String | suggested |
| Cover art (file name) | cover | Bare filename of the book cover image, without the 'File:' prefix.
| File | suggested |
| Cover alt text | alt | Alternative text for the cover image, used by screen readers. | String | optional |
| Cover caption | caption | A caption shown beneath the cover image, usually describing the edition.
| String | optional |
| Author | author | Author of the book. Can be a wikilink, e.g. [[Mary Shelley]]. | Content | required |
| Publication year | year | The year the book was first published.
| Number | required |
See also
- {{Infobox book}} — the full-featured version with many more fields.
The above documentation is transcluded from Template:Infobox book simple/doc (edit · history).
Editors can experiment in this template's sandbox and testcases pages.
Please add categories to the /doc subpage. Subpages of this template.
A concise infobox for books, showing title, cover art, author and year of publication.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Title | title | The book's title. If left blank, the article title is used. | String | suggested |
| Cover art (file name) | cover | Bare filename of the book cover image, without the 'File:' prefix.
| File | suggested |
| Cover alt text | alt | Alternative text for the cover image. | String | optional |
| Cover caption | caption | A caption shown beneath the cover image. | String | optional |
| Author | author | Author of the book. Can be a wikilink. | Content | required |
| Publication year | year | The year the book was first published.
| Number | required |