Template:Catalog lookup link

Template documentation follows
Note: the template above may sometimes be partially or fully invisible.
Visit "Template:Catalog lookup link/doc" to edit its documentation if it is available. (How does this work?)


This generic link template is used by other more specific templates to create short links to ID-based entries in external databases or catalogs, however, it can also be used to link to internal articles. The purpose of this template is to ensure a consistent appearance and easier maintenance of links to external databases/catalogs.

The template supports up to 9 unnamed parameters for the ID entries as well as a number of optional named parameters to adjust the link format to the target database and to modify the display format to make it suitable for as many catalog links as possible.

While additional format options might be provided in the future, the default output should always remain a short, but clear and unobtrusive single-line format suitable for inclusion as argument of the |id= parameter of the various {{citation}} templates. Typically, the template is not used directly, but indirectly called through other more specific templates (like those listed below under See also).

Parameters

  • |1=, |2=, |3=, |4=, |5=, |6=, |7=, |8=, |9=: Optional unnamed parameters for 0 to 9 items to be listed. Whitespace is trimmed off both ends and the strings are urlencoded as if they were query strings.
  • |article-link=: Optional Wikipedia article name to link to.
  • |article-name=: Optional alternative text to be displayed for |article-link= link in front of catalog link. If not specified, |article-link= is used for display as well. If both parameters are not specified, the prefix is omitted completely.
  • |article-suffix=: Optional symbol to be displayed after article name or link (f.e. ":"; omitted, if not defined).
  • |link-prefix=: Optional prefix portion of url to external catalog item(s).
  • |link-suffix=: Optional suffix portion of url to external catalog item(s).
  • |item-prefix=: Optional text displayed in front of each external link (omitted, if not defined)
  • |item-suffix=: Optional text displayed immediately after each external link (omitted, if not defined)
  • |list-separator=: Optional alternative separator displayed between list items (default: ", ", if not specified). Whitespace must be encoded.
  • |list-leadout=: Optional alternative leadout text displayed between the last two list items (f.e. "and", "or", "as well as", etc., default is the |list-separator= or ", ".)
  • |leadout-suffix=: Optional alternative suffix text of the leadout (see |list-leadout=) displayed between the last two list items. This gets added in front of the last list item instead of the default whitespace which is added without this parameter. This may be necessary if |list-separator= is used not only to define the list separator but also parts of the item prefix (except for the first one). (At present, this is used only to cope with format oddities of the {{MR}} template.)

Examples

The following examples do not reflect actual usage examples and are provided here mostly for quick output format checking. For actual usage examples, please study the templates listed further down under See also.

  • Example 1 (article-link and article-name):
{{Catalog lookup link|1|2|3|4|5|6|7|8|9|article-link=Wikipedia|article-name=WP|link-prefix=https://en.wikipedia.org/wiki/}}
WP 1, 2, 3, 4, 5, 6, 7, 8, 9
  • Example 2 (only article-link):
{{Catalog lookup link|1|2|3|4|5|6|7|8|9|article-link=Wikipedia|link-prefix=https://en.wikipedia.org/wiki/}}
Wikipedia 1, 2, 3, 4, 5, 6, 7, 8, 9
  • Example 3 (only article-name):
{{Catalog lookup link|1|2|3|4|5|6|7|8|9|article-name=WP|link-prefix=https://en.wikipedia.org/wiki/}}
WP 1, 2, 3, 4, 5, 6, 7, 8, 9
  • Example 4 (neither article-link nor article-name):
{{Catalog lookup link|1|2|3|4|5|6|7|8|9|link-prefix=https://en.wikipedia.org/wiki/}}
1, 2, 3, 4, 5, 6, 7, 8, 9
  • Example 5 (with article-suffix, item-prefix, item-suffix, link-suffix):
{{Catalog lookup link|1|2|3|4|5|6|7|8|9|article-link=Wikipedia|article-name=WP|article-suffix=:|link-prefix=https://en.wikipedia.org/wiki/|link-suffix=#hash|item-prefix=<|item-suffix=>}}
WP: <1>, <2>, <3>, <4>, <5>, <6>, <7>, <8>, <9>
  • Example 6 (without link-prefix, with article-suffix, item-prefix, item-suffix):
{{Catalog lookup link|1|2|3|4|5|6|7|8|9|article-link=Wikipedia|article-name=WP|article-suffix=:|item-prefix=<|item-suffix=>}}
WP: <1>, <2>, <3>, <4>, <5>, <6>, <7>, <8>, <9>
  • Example 7 (list-leadout, list-separator):
{{Catalog lookup link|1|2|3|4|5|6|7|8|9|list-leadout=and|list-separator=&amp;#32;/&amp;#32;|article-link=Wikipedia|article-name=WP|link-prefix=https://en.wikipedia.org/wiki/}}
WP 1 / 2 / 3 / 4 / 5 / 6 / 7 / 8 and 9

See also

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Catalog lookup link in articles based on its TemplateData.

TemplateData for Catalog lookup link

This generic link template is used by other more specific templates to create short links to ID-based entries in external databases or catalogs, however, it can also be used to link to internal articles. The purpose of this template is to ensure a consistent appearance and easier maintenance of links to external databases/catalogs. The template supports up to 9 unnamed parameters for the ID entries as well as a number of optional named parameters to adjust the link format to the target database and to modify the display format to make it suitable for as many catalog links as possible.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
First unnamed parameter1

no description

Stringoptional
Second unnamed parameter2

no description

Stringoptional
Third unnamed parameter3

no description

Stringoptional
Fourth unnamed parameter4

no description

Stringoptional
Fifth unnamed parameter5

no description

Stringoptional
Sixth unnamed parameter6

no description

Stringoptional
Seventh unnamed parameter7

no description

Stringoptional
Eighth unnamed parameter8

no description

Stringoptional
Nineth unnamed parameter9

no description

Stringoptional
Article linkarticle-link

Wikipedia article name to link to

Page nameoptional
Alt article namearticle-name

Alternative text to be displayed for |article-link= link in front of catalog link. If not specified, |article-link= is used for display as well. If both parameters are not specified, the prefix is omitted completely.

Stringoptional
Article suffixarticle-suffix

article-suffix

Stringoptional
Link prefixlink-prefix

Prefix portion of url to external catalog item(s)

Unknownoptional
Link suffixlink-suffix

Prefix portion of url to external catalog item(s)

Stringoptional
Item prefixitem-prefix

Suffix portion of url to external catalog item(s)

Stringoptional
Item suffixitem-suffix

Text displayed immediately after each external link (omitted, if not defined)

Stringoptional
List separatorlist-separator

Alternative separator displayed between list items (default: ", ", if not specified). Whitespace must be encoded.

Default
,
Stringoptional
List leadoutlist-leadout

Alternative leadout text displayed between the last two list items (f.e. "and", "or", "as well as", etc., default is the |list-separator= or ", ".)

Stringoptional
Leadout suffixleadout-suffix

Alternative suffix text of the leadout (see |list-leadout=) displayed between the last two list items. This gets added in front of the last list item instead of the default whitespace which is added without this parameter. This may be necessary if |list-separator= is used not only to define the list separator but also parts of the item prefix (except for the first one).

Stringoptional
URL access levelurl-access-all

Classification of the access restrictions on the URL

Suggested values
registration limited subscription
Stringoptional
First URL access levelurl-access1

Classification of the access restrictions on the URL

Suggested values
registration limited subscription
Stringoptional
Second URL access levelurl-access2

Classification of the access restrictions on the URL

Suggested values
registration limited subscription
Stringoptional
Thrid URL access levelurl-access3

Classification of the access restrictions on the URL

Suggested values
registration limited subscription
Stringoptional
Fourth URL access levelurl-access4

Classification of the access restrictions on the URL

Suggested values
registration limited subscription
Stringoptional
Fifth URL access levelurl-access5

Classification of the access restrictions on the URL

Suggested values
registration limited subscription
Stringoptional
Sixth URL access levelurl-access6

Classification of the access restrictions on the URL

Suggested values
registration limited subscription
Stringoptional
Seventh URL access levelurl-access7

Classification of the access restrictions on the URL

Suggested values
registration limited subscription
Stringoptional
Eighth URL access levelurl-access8

Classification of the access restrictions on the URL

Suggested values
registration limited subscription
Stringoptional
Nineth URL access levelurl-access9

Classification of the access restrictions on the URL

Suggested values
registration limited subscription
Stringoptional