Template:BookShortcut

From Guild of Recappers & Podcasters
Revision as of 16:58, 12 March 2023 by Ben (talk | contribs) (Updated instructions)
Jump to navigation Jump to search

This template allows our book shortcut templates to link to this wiki, the L-Space wiki, Wikipedia and other commonly linked sites. It's intended for use inside individual book shortcut templates like {{COM}}, which by default links to The Colour of Magic.

Similar templates exist for Short Stories (Template:ShortStoryShortcut) and nonfiction (Template:NonfictionShortcut).

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 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 the destination 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.

  • apf - the Annotated Pratchett File. This links to the original, hosted at www.lspace.org. Note that it only contains entries with annotations up to A Hat Full of Sky, but there are empty pages for all the Discworld books and many of the others.
  • cs - Colin Smythe's official website, at colinsmythe.co.uk.
  • 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:”.

There is also one special “destination” which doesn’t include a link:

  • ep - a quick way to insert the name of the book in inverted commas without italicisation or a link, intended for episode titles of podcasts which just use the book title.

The cs and apf options use additional template parser functions to convert the book title into lower case and replace spaces with dashes so it forms part of the URL of the destination site. Note that some books use abbreviated titles on colinsmythe.co.uk, and even on the APF where full titles are used in the URL, punctuation in titles is removed to make it easier to parse as HTML. In both instances, the altered text used in the URL will need to be specified as the link name. For example: {{BookShortcut|The Colour of Magic|cs|colour-magic}} for The Colour of Magic, or {{BookShortcut|Guards! Guards!|apf|guards-guards}} for Guards! Guards!.