Template:BookShortcut: Difference between revisions

From Guild of Recappers & Podcasters
Jump to navigation Jump to search
No edit summary
Line 20: Line 20:
* '''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:".
* '''cs''' - Colin Smythe's official website, at colinsmythe.co.uk. This uses additional template parser functions to convert the book title into lower case and replace spaces with dashes so it can be parsed. e.g. <nowiki>{{BookShortcut|Carpe Jugulum|cs}}</nowiki> produces a link like this: {{BookShortcut|Carpe Jugulum|cs}}. Note that some books use abbreviated text, which will need to be specified as the link name; for example: <nowiki>{{BookShortcut|The Colour of Magic|cs|colour-magic}}</nowiki> for {{BookShortcut|The Colour of Magic|cs|colour-magic}}
* '''cs''' - Colin Smythe's official website, at colinsmythe.co.uk. This uses additional template parser functions to convert the book title into lower case and replace spaces with dashes so it can be parsed. e.g. <nowiki>{{BookShortcut|Carpe Jugulum|cs}}</nowiki> produces a link like this: {{BookShortcut|Carpe Jugulum|cs}}. Note that some books use abbreviated titles in their URLs, which will need to be specified as the link name; for example: <nowiki>{{BookShortcut|The Colour of Magic|cs|colour-magic}}</nowiki> for {{BookShortcut|The Colour of Magic|cs|colour-magic}}


[[Category:Shortcut Templates]]
[[Category:Shortcut Templates]]
[[Category:Book Shortcut Templates|*]]</noinclude>
[[Category:Book Shortcut Templates|*]]</noinclude>

Revision as of 19:14, 24 April 2022

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.

A similar template, Template:ShortStoryShortcut, exists for Short Stories.

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
  • 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:".
  • cs - Colin Smythe's official website, at colinsmythe.co.uk. This uses additional template parser functions to convert the book title into lower case and replace spaces with dashes so it can be parsed. e.g. {{BookShortcut|Carpe Jugulum|cs}} produces a link like this: Carpe Jugulum. Note that some books use abbreviated titles in their URLs, which will need to be specified as the link name; for example: {{BookShortcut|The Colour of Magic|cs|colour-magic}} for The Colour of Magic