模板: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.

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

See also

上述文档内容嵌入自Template:Catalog lookup link/doc编辑 | 历史
编者可以在本模板的沙盒创建 | 镜像和测试样例创建页面进行实验。
请将模板自身所属的分类添加在文档中。本模板的子页面