Template:BookShortcut: Difference between revisions
Jump to navigation
Jump to search
(Updated description) |
(Improved documentation and categorisation) |
||
Line 10: | Line 10: | ||
* The '''Title''' is the title of the book, and is always required. If this is the only parameter, it will produce a local link - e.g. <nowiki>{{BookShortcut|Diggers}}</nowiki> produces: {{BookShortcut|Diggers}} | * The '''Title''' is the title of the book, and is always required. If this is the only parameter, it will produce a local link - e.g. <nowiki>{{BookShortcut|Diggers}}</nowiki> produces: {{BookShortcut|Diggers}} | ||
* | ** Note that the template adds " (book)" to the specified title if such a page exists, to avoid linking to disambiguation pages, though it only displays the title of the book. e.g. <nowiki>{{BookShortcut|Wyrd Sisters}}</nowiki> links to {{BookShortcut|Wyrd Sisters}}, not "[[Wyrd Sisters]]". | ||
* The '''Destination''' parameter is required if linking externally to one of the defined alternate locations; the list below documents these. e.g. <nowiki>{{BookShortcut|Diggers|ls}}</nowiki> produces: {{BookShortcut|Diggers|ls}} | * The '''Destination''' parameter is required if linking externally to one of the defined alternate locations; the list below documents these. e.g. <nowiki>{{BookShortcut|Diggers|ls}}</nowiki> produces: {{BookShortcut|Diggers|ls}} | ||
* The '''Link name''' parameter is only used when one of the defined external sites uses a different page or article name for this book. If it's omitted, the link will be to the title defined in the first parameter.<br/> e.g. <nowiki>{{BookShortcut|Diggers|w|The Nome Trilogy#Diggers (1990)}}</nowiki> produces: {{BookShortcut|Diggers|w|The Nome Trilogy#Diggers (1990)}} | * The '''Link name''' parameter is only used when one of the defined external sites uses a different page or article name for this book. If it's omitted, the link will be to the title defined in the first parameter.<br/> e.g. <nowiki>{{BookShortcut|Diggers|w|The Nome Trilogy#Diggers (1990)}}</nowiki> produces: {{BookShortcut|Diggers|w|The Nome Trilogy#Diggers (1990)}} | ||
== Destinations supported == | == Destinations supported == | ||
These are the abbreviations for destinations you can use as the second parameter when calling this template. | |||
* '''ls''' - the L-Space wiki. This uses the "lsb:" inter-wiki prefix, which adds the "Book:" namespace to the link. | * '''ls''' - the L-Space wiki. This uses the "lsb:" inter-wiki prefix, which adds the "Book:" namespace to the link. | ||
* '''w''' - Wikipedia. This uses the standard inter-wiki link prefix of "wikipedia:". | * '''w''' - Wikipedia. This uses the standard inter-wiki link prefix of "wikipedia:". | ||
[[Category:Shortcut Templates]] | [[Category:Shortcut Templates]] | ||
[[Category:Book Shortcut Templates]]</noinclude> | [[Category:Book Shortcut Templates|*]]</noinclude> |
Revision as of 03:51, 19 December 2021
This template allows our book shortcut templates to link to this wiki, the L-Space wiki or Wikipedia (and may include other options later). It's intended for use inside individual book shortcut templates like {{COM}}, which by default links to The Colour of Magic.
Usage
The template expects one to three unnamed parameters, in order: {{BookShortcut|Title|Destination|Link name}}
- The Title is the title of the book, and is always required. If this is the only parameter, it will produce a local link - e.g. {{BookShortcut|Diggers}} produces: Diggers
- Note that the template adds " (book)" to the specified title if such a page exists, to avoid linking to disambiguation pages, though it only displays the title of the book. e.g. {{BookShortcut|Wyrd Sisters}} links to Wyrd Sisters, not "Wyrd Sisters".
- The Destination parameter is required if linking externally to one of the defined alternate locations; the list below documents these. e.g. {{BookShortcut|Diggers|ls}} produces: Diggers
- The Link name parameter is only used when one of the defined external sites uses a different page or article name for this book. If it's omitted, the link will be to the title defined in the first parameter.
e.g. {{BookShortcut|Diggers|w|The Nome Trilogy#Diggers (1990)}} produces: Diggers
Destinations supported
These are the abbreviations for destinations you can use as the second parameter when calling this template.
- ls - the L-Space wiki. This uses the "lsb:" inter-wiki prefix, which adds the "Book:" namespace to the link.
- w - Wikipedia. This uses the standard inter-wiki link prefix of "wikipedia:".