Template:Subfield

From CCS Cataloging Manual
Jump to navigation Jump to search

‡{{{1}}}

Usage

Automatically formats subfield delimiters and codes. It is especially useful in tables and nested in other templates (such as Template:Example), where the pipe character has a special value.

The default color is #7F00FF (violet). Note that you cannot specify the background color without also specifying the foreground color. So, to set only the background color without changing the default foreground color, use color=purple|background= and your background color; to set the background color with a plain black foreground, use color=black|background= and your background color. Colors can be specified using either standard CSS color names or using six-character hexadecimal codes.

The default delimiter style is a double dagger and no leading or trailing spaces. The only other defined style is "oclc", which uses a double dagger and has both leading and trailing spaces.

Examples

  • /{{subfield|c}}by gives: /‡cby
  • /{{subfield|color=orange|c}}by gives: /‡cby
  • /{{subfield|color=purple|background=orange|c}}by gives: /‡cby
  • /{{subfield|style=oclc|c}}by gives: / ‡c by
  • /{{subfield|color=orange|style=oclc|c}}by gives: / ‡c by
  • /{{subfield|color=purple|background=orange|style=oclc|c}}by gives: / ‡c by

Example in a MARC field:

{{example|text=300 32 pages :{{subfield|b}}color illustrations ;{{subfield|c}}24 cm}} gives:

300  32 pages :‡bcolor illustrations ;‡c24 cm