Difference between revisions of "Template:LCCN"

From blackwiki
Jump to navigation Jump to search
imported>Headbomb
m (Reverted edits by Headbomb (talk) to last version by Bsadowski1)
imported>AManWithNoPlan
(remove legacy support)
Line 1: Line 1:
<includeonly><!--
+
<includeonly>
-->{{#if:{{{3|}}}|<!--
+
{{LCCN/prepare
Legacy code to handle old uses:
 
-->{{LCCN/core|1={{{1}}}|2={{{3}}} }}[[Category:Articles using legacy format in Template:LCCN]]<!-- End legacy code.
 
-->|<!--Smart code using just one parameter:-->{{LCCN/prepare
 
 
|{{{1|}}}
 
|{{{1|}}}
 
|{{#iferror:{{#expr:{{padleft:|2|{{{1|}}} }} }}|2
 
|{{#iferror:{{#expr:{{padleft:|2|{{{1|}}} }} }}|2
|{{#ifeq:{{padright:{{{1|}}}|10|x}}|{{{1|}}}|2|0}} }} }}<!--
+
|{{#ifeq:{{padright:{{{1|}}}|10|x}}|{{{1|}}}|2|0}} }} }}
-->}}</includeonly><noinclude>
+
</includeonly><noinclude>
 
{{documentation}}
 
{{documentation}}
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS -->
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS -->
 
</noinclude>
 
</noinclude>

Revision as of 04:33, 10 November 2015

Template documentation[view] [edit] [history] [purge]

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

LCCN Expression error: Unrecognized punctuation character "[". 89-Expression error: Unrecognized punctuation character "[".Template:Only in print


and to link sa65-3567, use:

{{LCCN|sa653567}} gives

LCCN Expression error: Unrecognized punctuation character "[". sa65-Expression error: Unrecognized punctuation character "[".Template:Only in print


Additional parameters

You can use a second parameter to add a title.

{{LCCN|89456|Monarch butterflies}}

LCCN Expression error: Unrecognized punctuation character "[". 89-Expression error: Unrecognized punctuation character "[".Template:Only in print


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

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

LCCN Expression error: Unrecognized punctuation character "[". sa65-Expression error: Unrecognized punctuation character "[".Template:Only in print


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

LCCN Expression error: Unrecognized punctuation character "[". sa65-Expression error: Unrecognized punctuation character "[".Template:Only in print


TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for LCCN

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

See also