Відкрити головне меню
{{i}} Документація шаблону[перегляд] [редагувати] [історія] [очистити кеш]

Цей загальний шаблон посилання використовується іншими більш конкретними шаблонами для створення коротких посилань на основі ідентифікаторів записів у зовнішніх баз даних або каталогах. Мета цього шаблону полягає в забезпеченні узгодженого зовнішнього вигляду і більш легкого обслуговування посилань на зовнішні бази даних/каталогів.

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).

ПараметриРедагувати

  • |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-postfix=: 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-postfix=: Optional postfix portion of url to external catalog item(s).
  • |item-prefix=: Optional text displayed in front of each external link (omitted, if not defined)
  • |item-postfix=: 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 ", ".)

ПрикладиРедагувати

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.

  • Приклад 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=//en.wikipedia.org/wiki/}}
WP 1, 2, 3, 4, 5, 6, 7, 8, 9
  • Приклад 2 (only article-link):
{{Catalog lookup link|1|2|3|4|5|6|7|8|9|article-link=Wikipedia|link-prefix=//en.wikipedia.org/wiki/}}
Wikipedia 1, 2, 3, 4, 5, 6, 7, 8, 9
  • Приклад 3 (only article-name):
{{Catalog lookup link|1|2|3|4|5|6|7|8|9|article-name=WP|link-prefix=//en.wikipedia.org/wiki/}}
WP 1, 2, 3, 4, 5, 6, 7, 8, 9
  • Приклад 4 (neither article-link nor article-name):
{{Catalog lookup link|1|2|3|4|5|6|7|8|9|link-prefix=//en.wikipedia.org/wiki/}}
 1, 2, 3, 4, 5, 6, 7, 8, 9
  • Приклад 5 (with article-postfix, item-prefix, item-postfix, link-postfix):
{{Catalog lookup link|1|2|3|4|5|6|7|8|9|article-link=Wikipedia|article-name=WP|article-postfix=:|link-prefix=//en.wikipedia.org/wiki/|link-postfix=#hash|item-prefix=<|item-postfix=>}}
WP<1>, <2>, <3>, <4>, <5>, <6>, <7>, <8>, <9>
  • Приклад 6 (without link-prefix, with article-postfix, item-prefix, item-postfix, link-postfix):
{{Catalog lookup link|1|2|3|4|5|6|7|8|9|article-link=Wikipedia|article-name=WP|article-postfix=:|link-postfix=#hash|item-prefix=<|item-postfix=>}}
WP: <1>, <2>, <3>, <4>, <5>, <6>, <7>, <8>, <9>
  • Приклад 7 (list-leadout, list-separator):
{{Catalog lookup link|1|2|3|4|5|6|7|8|9|list-leadout=and|list-separator=&#32;/&#32;|article-link=Wikipedia|article-name=WP|link-prefix=//en.wikipedia.org/wiki/}}
WP 1 / 2 / 3 / 4 / 5 / 6 / 7 / 8 and 9