Difference between revisions of "Template:LCCN/doc"

From blackwiki
Jump to navigation Jump to search
imported>Vanisaac
m (→‎See also: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other)
imported>Pokechu22
(Add TemplateData)
Line 45: Line 45:
 
[[Category:United States government external link templates]]
 
[[Category:United States government external link templates]]
 
}}</includeonly>
 
}}</includeonly>
 +
<templatedata>
 +
{
 +
"params": {
 +
"1": {
 +
"aliases": [
 +
"id"
 +
],
 +
"label": "LCCN id",
 +
"description": "LCCN without hyphens",
 +
"example": "89456",
 +
"type": "string",
 +
"required": true
 +
},
 +
"2": {
 +
"aliases": [
 +
"title",
 +
"name"
 +
],
 +
"label": "Title",
 +
"description": "Title of the book",
 +
"example": "Monarch butterflies",
 +
"type": "string"
 +
},
 +
"long": {
 +
"label": "Long format",
 +
"description": "yes to use the long format",
 +
"example": "yes",
 +
"type": "boolean"
 +
}
 +
},
 +
"description": "References a Library of Congress Control Number."
 +
}
 +
</templatedata>

Revision as of 22:14, 12 October 2020

Usage

This template is used for referring to books by their Library of Congress Control Numbers. Enter the LCCN without any dashes or vertical bars between the numbers.

Examples

For example, to link 89-456, use:

{{LCCN|89456}} gives

and to link sa65-3567, use:

{{LCCN|sa653567}} gives


Additional parameters

You can use a second parameter to add a title.

{{LCCN|89456|Monarch butterflies}}

By specifying | long = yes, you can also provide a more detailed output, especially for use in External Links sections:

{{LCCN|89456|long=yes}} gives

You can also use the second parameter to specify the book title if the page where the name of the article you're working on is not identical to the work you're citing. This is often true in the case of parenthetical disambiguation:

{{LCCN|89456|Monarch butterflies|long=yes}} gives

See also


References a Library of Congress Control Number.

Template parameters

ParameterDescriptionTypeStatus
LCCN id1 id

LCCN without hyphens

Example
89456
Stringrequired
Title2 title name

Title of the book

Example
Monarch butterflies
Stringoptional
Long formatlong

yes to use the long format

Example
yes
Booleanoptional