Template:A/doc

From ISFDB
< Template:A
Revision as of 10:19, 8 September 2022 by Ahasuerus (talk | contribs) (→‎Usage: HTTPS upgrade)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Documentation for Template:A transcluded from Template:A/doc.

Use this template to link to an author's name, almost as easy as just typing the name itself.

Important! Because of the way MediaWiki parses URLs, your author name cannot have any spaces in it! So you can use {{a|Author_Name}}, but not {{a|Author Name}}!

The template now automatically converts spaces to underscores as needed.

An optional name parameter allows the link to be displayed with a different text than the author name. So, for example, {{A|Elizabeth Moon}} gives the link Elizabeth Moon, while {{A|Elizabeth Moon|name=Moon}} gives the link: Moon.

Usage

{{A|Jack Vance}}

gives Jack Vance and links to http://www.isfdb.org/cgi-bin/ea.cgi?Jack_Vance

while

{{A|Jack Vance|name=John Holbrook Vance}}

gives John Holbrook Vance and also links to https://www.isfdb.org/cgi-bin/ea.cgi?Jack_Vance

Special case

If the author's name contains any non-alphanumeric characters, such as ( or ) or , or ', (that is left-paren, right-paren, comma, or single quote) the normal use of the template will convert these to hex codes, which will not create the correct URL. For this special case, use the special parameter altName, and a version of the name with spaces converted to underscores. Other characters outside A-Z, a-z, and 0-9 may have the same issue. In at least some cases, comma or period seem to cause the same problem.

So if the author's canonical name is "Donald Macpherson (Artist)", then

{{A|altName=Donald_Macpherson_(Artist)}}

gives

Donald_Macpherson_(Artist) (Note that the link has underscores visible)

and

{{A|altName=Donald_Macpherson_(Artist)|name=Donald Macpherson (Artist)}}

gives

Donald Macpherson (Artist) (Note that the link now has spaces instead of underscores)

and

{{A|altName=Donald_Macpherson_(Artist)|name=Donald Macpherson}}

gives

Donald Macpherson (Note that the link is clean and short, but you have to put more work into the template to get it.)

The following is an example using the template where an artist name contains an e-acute ("é").

"{{a|Mary GrandPré|altName=Mary_GrandPr%E9}}" gives "Mary GrandPré" and will correctly link to her bibliography.

This special parameter may also be specified as "altname=" with a lowercase "n".

Linking using the ISFDB Author Record #

Rather than using the altName parameter as described in the previous section you can instead use the ISFDB Author Record # which is displayed in the upper-right corner of every ISFDB Summary Bibliography page.

The form to link using the record number is:

{{A|Jack Vance|136}} or {{A|Donald Macpherson|115953}}

which gives Jack Vance and links to https://www.isfdb.org/cgi-bin/ea.cgi?136
and Donald Macpherson which links to https://www.isfdb.org/cgi-bin/ea.cgi?115953