Defining Formatting Options

Information Portal delivers a pre-formatted display option with the Tag856 MARC map. (For details on this format, see Example 5: Hyperlinked Image Format (Delivered).) If you want to customize your Tag856MARC map, use the information in this section to help you define unique display options.

The Tag856 MARC map contains a Format field, which makes Information Portal work in a different way than with regular Horizon MARC maps. The text in the Format field determines which logic Information Portal uses to display information and hyperlinks. Only Information Portal uses the Format field; other Horizon products ignore it. Here are the main logic differences that the Format field introduces:

Information extraction from subfields. Information Portal-specific MARC maps step through the MARC record tag-by-tag and subfield-by-subfield to extract and append subfields to the output. (For example, if a bib record contains two 856 tags, each having subfields “u” and “y”, a Horizon MARC map would extract them in this order: “uuyy”. However, the Information Portal MARC map extracts them like this: “uy” and “uy”.)
Static text display. You can set up Information Portal-specific MARC maps to display MARC data in cataloging order. This lets Information Portal display static text (in tag 856, subfield y) either before or after the hyperlink.

You can edit the Format field to change the display in Information Portal in many ways. As a general syntax rule, you can include any character in the Format field. Information Portal interprets these characters as regular text and includes them “as-is” in the output HTML. Here are the exceptions to this rule:

The dollar sign ( $ ). This is used to indicate subfield names. (For example, “$a” represents subfield a.) However, a special case is the dollar sign followed by the underscore ( $_ ). This represents the subfield specified in the Part field
The “{a|b|c}” notation. This indicates alternative subfields. (Alternative subfields are subfields that you specify for Information Portal to use if the usual subfield does not exist on the MARC record.)

If you need to use one of these characters as regular text in the Format field, then you can use the back slash ( \ ) before the character. (For example, enter “\$” for Information Portal to display the dollar sign.)

The Tag856 MARC map delivers this linkable tag display option:

Tag

Part

Format

856

u

<a href=“$_”>{<img src=“$9”{ alt=“$y”}>|$y|$_}</a>

This Part displays a hyperlink based on subfields “$u,” “$y,” and “$9.”

856

z

$_

This Part displays the static text as it appears in the “z” subfield.

You can switch the subfield order around to change the display in Information Portal in many ways. This section includes six examples on how you may format the Format field in the Tag856 MARC map using this example cataloged 856 tag:

856 $uhttp://www.SirsiDynix.com $yGo to SirsiDynix site

Example 1: Basic HTML Format Tag

If your 856 tag is cataloged like this:

856 $uhttp://www.SirsiDynix.com $yGo to SirsiDynix site

You can change the Format field in the Tag856 Marc map (subfield u) to this:

<a href=“$_”>$y</a>

Then Information Portal would display hyperlinked text associated with the URL like this:

Go to SirsiDynix site

Now, the text “Go to SirsiDynix site” displays as the hyperlink to the URL “http://www.SirsiDynix.com”. If the user clicks the hyperlink, Information Portal launches the SirsiDynix web site.

If you want to display only parts of subfields in Information Portal, you must enter that substring in the Part field, then you must enter the dollar sign and underscore character ( $_ ) in the Format field. (For example, if you want to display only the first 10 characters of subfield “u”, then you would specify “u/0.10” in the Part field and “$_” in the Format field. If only “$u” was specified in the Part field, then Information Portal would display the entire information in subfield “u”.)

Example 2: Optional and Alternate 856 Tag Subfield Format

You can specify optional subfields by using the brace characters ( { } ). When you do this, Information Portal looks for and displays subfields in the order that they are listed. If you do not include the braces around your subfield tags, Information Portal stops looking after the first subfield, and it does not display hyperlinks for the other subfields, even if they exist.

Additionally, you can use the pipe character ( | ) to specify alternatives to optional fields. (For example, some 856 tags have a “$y” subfield and others do not.) This pipe character functions as an “OR” operator. It instructs Information Portal to use a specified subfield if it exists, or use the next subfield if it does not exist. Information Portal steps through the alternatives until it finds one for which the subfields exist in the MARC data.

If your 856 tag is cataloged like this:

856 $uhttp://www.SirsiDynix.com $yGo to SirsiDynix site

You can change the Format field in the Tag856 Marc map to this:

<a href=“$_”>{$y|$9|$u}</a>

(For example, Information Portal looks for the “$y” subfield to display the “Go to SirsiDynix site” hyperlink first. If it does not exist, then it looks for the $9 subfield [a graphical image source]. If it does not exist, then Information Portal defaults to display the “$u” subfield: “http://www.SirsiDynix.com”.)

If you do not include contingency subfields in your format, then hyperlinks that might use other subfields are not displayed in Information Portal.

Example 3: Non-hyperlinked Subfield Format

If you want to display 856 tag subfields but do not want them to be hyperlinked text, then you must insert the subfield either before or after the anchor tag. Suppose you want to display the value of the “$3” subfield as regular text before the link.

If your 856 tag is cataloged like this:

856 $uhttp://www.SirsiDynix.com $yGo to SirsiDynix site$3Click here:

You can change the Format field in the Tag856 Marc map to this:

$3 <a href=“$_”>{$y|$9|$u}</a>

(For example, Information Portal displays the “$3” static text field, then it looks for the “$y” subfield to display the “Go to SirsiDynix site” first. If it does not exist, then it looks for the “$9” subfield [a graphical image source]. If that subfield does not exist, then it defaults to display the “u” subfield: “http://www.SirsiDynix.com”.)

Example 4: Changing the Subfield Display Order

For the non-hyperlinked subfield format, subfield “3” always displays before the hyperlink. However, if you do not want subfield “$3” to always be displayed before the “$u” subfield, then you can change the order. (For example, you might want the subfields to display in the order that they are cataloged.) To accomplish this, you must create two entries in the Extraction group of the marc_map view in this order:

Tag

Part

Format

856

3

$_

856

u

<a href=“$_”>{$y|$_}</a>

(For instructions on accessing the Extraction group and completing the fields, see “MARC Maps” in the “General Setup” chapter of the Horizon System Administration Guide.)

This configuration instructs Information Portal to display subfields “3” and “u” in the same order that they are displayed in Cataloging.

Example 5: Hyperlinked Image Format (Delivered)

This example defines the configuration of the Tag856 MARC map that is delivered with Information Portal. This should meet the needs of most libraries. This example introduces the <img> tag. The <img> tag defines a graphical thumbnail image as the hyperlink rather than text or a URL.

These are the default entries in the Extraction group of the Tag856 MARC map:

Tag

Part

Format

856

u

<a href=“$_”>{<img src=“$9”{ alt=“$y”}>|$y|$_}</a>

856

z

$_

(For instructions on accessing the Extraction group and completing the fields, see “MARC Maps” in the “General Setup” chapter of the Horizon System Administration Guide.)

In this example, if a library catalogs the image in the “$9” subfield, Information Portal displays the graphical image as the hyperlink. Also, the “{ alt=“$y”}” instructs Information Portal to display pop-up alternate text when the cursor is placed over the graphical image in Information Portal.

Example 6: Open Another Browser Window Format

You can configure Information Portal to open a new browser window when a user clicks on a link, instead of displaying the results in the same window.

You can change the Format from this:

<a href=“$_”>{<img src=“$9”{ alt=“$y”}>|$y|$_}</a>

To this:

<a href=“$_” target=”main”>{<img src=“$9”{ alt=“$y”}>|$y|$_}</a>

 


© 1998-2017 Sirsi Corporation