Template:Cite book: Difference between revisions
From WikiMD's Wellness Encyclopedia
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
{{#if:{{{title|}}} | <!-- Ensure at least a title is provided --> | {{#if:{{{title|}}} | <!-- Ensure at least a title is provided --> | ||
{{#if:{{{author|}}} | {{#ifeq:{{{last|}}}|{{{author|}}}| | {{{last}}}, }} }} | {{#if:{{{author|}}} | {{#ifeq:{{{last|}}}|{{{author|}}}| | {{{last}}}, }} }} | ||
{{#if:{{{first|}}}|{{{first}}} }}{{#if:{{{author|}}}|{{{author}}}}}, | {{#if:{{{first|}}}|{{{first}}} }}{{#if:{{{author|}}}|{{{author}}}}}, | ||
{{#if:{{{coauthors|}}}|{{{coauthors}}}, }} | {{#if:{{{coauthors|}}}|{{{coauthors}}}, }} | ||
'''{{{title}}}'''{{#if:{{{url|}}}|. [{{{url}}} online version]}}, | '''{{{title}}}'''{{#if:{{{url|}}}|. [{{{url}}} online version]}}, | ||
{{#if:{{{edition|}}}|{{{edition}}} edition, }} | {{#if:{{{edition|}}}|{{{edition}}} edition, }} | ||
{{#if:{{{location|}}}|{{{location}}}: }}{{#if:{{{publisher|}}}|{{{publisher}}}, }} | {{#if:{{{location|}}}|{{{location}}}: }}{{#if:{{{publisher|}}}|{{{publisher}}}, }} | ||
{{#if:{{{year|}}}|{{{year}}}, }} | {{#if:{{{year|}}}|{{{year}}}, }} | ||
{{#if:{{{series|}}}|Series: {{{series}}}, }} | {{#if:{{{series|}}}|Series: {{{series}}}, }} | ||
{{#if:{{{volume|}}}|Volume: {{{volume}}}, }} | {{#if:{{{volume|}}}|Volume: {{{volume}}}, }} | ||
{{#if:{{{isbn|}}}|ISBN {{{isbn}}}, }} | {{#if:{{{isbn|}}}|ISBN {{{isbn}}}, }} | ||
{{#if:{{{doi|}}}|DOI: {{{doi}}}, }} | {{#if:{{{doi|}}}|DOI: {{{doi}}}, }} | ||
{{#if:{{{id|}}}|ID: {{{id}}}, }} | {{#if:{{{id|}}}|ID: {{{id}}}, }} | ||
{{#if:{{{access-date|}}}|Accessed: {{{access-date}}}. }} | {{#if:{{{access-date|}}}|Accessed: {{{access-date}}}. }} | ||
{{#if:{{{pages|}}}|Pages: {{{pages}}}, }} | {{#if:{{{pages|}}}|Pages: {{{pages}}}, }} | ||
}} | }} | ||
</includeonly><noinclude> | </includeonly><noinclude> | ||
== Documentation == | == Documentation == | ||
This template is used to cite books in MediaWiki articles. The format dynamically includes only provided fields. | This template is used to cite books in MediaWiki articles. The format dynamically includes only provided fields. | ||
=== Parameters === | === Parameters === | ||
* '''title''' – The title of the book (required). | * '''title''' – The title of the book (required). | ||
Revision as of 16:54, 8 February 2025
Documentation
This template is used to cite books in MediaWiki articles. The format dynamically includes only provided fields.
Parameters
- title – The title of the book (required).
- author – The author(s) of the book (optional, can use `last` and `first`).
- coauthors – Coauthors, if applicable.
- url – URL to the book, if available online.
- edition – Edition of the book.
- location – Location of the publisher.
- publisher – Publisher name.
- year – Year of publication.
- series – Series name, if applicable.
- volume – Volume number, if part of a series.
- isbn – ISBN of the book.
- doi – DOI of the book.
- id – Additional identifier for the book.
- access-date – Date the book was accessed online.
- pages – Pages referenced.