#### 18.7.3 Configuring ALink and KLink jumps for HTML Help

When you use PI marker s for ALink or KLink jumps (see §16.6.5 Adding ALink and KLink jumps in DITA XML), you can specify values in the configuration file for several properties of the resulting <object>s that DITA2Go creates:

[MSHtmlHelpOptions]
;LinkType = Button (default), Chiclet, Graphic, Icon, Shortcut, Text
LinkType=Button
;LinkFlags = "1" (show dialog even for one item),
; ",,1" (if no items, make button disappear), or
; empty (if only one item, take the jump directly)
LinkFlags=1
;LinkEmptyTopic = name of .htm topic file to show if no items match
; at all; otherwise, unless LinkFlags=,,1, the Not Found complaint
; will be used.
;LinkEmptyTopic=noitems.htm
;LinkButtonWidth = pixels, if LinkType = Button, Graphic, or Icon
LinkButtonWidth=100
;LinkButtonHeight = pixels, if LinkType = Button, Graphic, or Icon
LinkButtonHeight=100
;LinkButtonText = Text: plus name on button, if LinkType=Button
LinkButtonText=Text:ALink
;LinkButtonGraphic = Bitmap: plus name of .bmp (only),
; if LinkType=Graphic
LinkButtonGraphic=Bitmap:mybutton.bmp
;LinkButtonIcon = Icon: plus name of .ico (only), if LinkType=Icon
LinkButtonIcon=Icon:mybutton.ico
;LinkTextFont = same syntax as PopFont above, if LinkType=Text
LinkTextFont=Helvetica,10,,PLAIN
; LinkText = Text: plus text to use for link, if LinkType=Text
LinkText=Text:Related Topics

Table 18-1 shows the properties you can configure, the values you can specify for each property, and the effect of each value.

Prefix the keyword

The base keyword for each property starts with Link; for example, LinkFlags. You must add a prefix to the base keyword to create a valid setting:

- To specify an ALink property, prefix the base name with A; for example, ALinkFlags=,,1.
- To specify a KLink property, prefix the base name with K; for example, KLinkButtonWidth=50.

All jumps

Properties you specify this way apply to all ALink or KLink jumps in your document.

Selected jumps

To configure properties for an individual ALink or KLink jump, insert a Link* PI marker just before the jump marker. The Link* marker-type name is the same as the name of the property, and the marker content is the value you want to assign to that property. For example, to provide a different label for one particular text-style ALink jump, in your DITA document, just before the ALink jump marker, insert a LinkText PI marker whose content is the alternate label.

Specify all relevant properties

For reasonable-looking output you should specify values for all properties that apply, because the default is to include only a few properties in the <object>. For example, for an ALink jump the default object DITA2Go generates looks like the following:

<object id="hhctrl" type="application/x-oleobject"
classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"
width="100" height="100">
<param name="Command" value="ALink">
<param name="Button" value="Text:ALink">
<param name="Flags" value="1">
<param name="Item1" value="">
<param name="Item2" value="ALink keyword">
</object>

This gets you a button labeled ALink, probably not what you wanted.

Table 18-1 ALink and KLink jump properties for HTML Help

Property keyword* | Value | Effect
* The property keyword must be prefixed with “A” for an ALink property, or “K” for a KLink property.
LinkType | Button (default) | Link is a button with LinkButtonWidth, LinkButtonHeight, and LinkButtonText attributes:
Chiclet | Link is a small button with no label:
Graphic | Link is a bitmap image, specified by LinkButtonGraphic
Icon | Link is an icon, specified by LinkButtonIcon
Shortcut | Link is a button with a shortcut icon:
Text | Link is text, with LinkText and LinkTextFont attributes
LinkFlags | 1 (default) | Show the dialog even if only one target is found
,,1 | Omit the link if no targets are found
(none) | Omit the dialog and jump directly if only one target is found; show “Not Found” if no targets are found
1,,1 | Untested; should show the dialog for a solitary target, omit the link if no targets are found.
LinkEmptyTopic | noitems.htm | Name of .htm topic file to show if no targets are found
(none) | Issue a” Not Found” complaint, unless LinkFlags=,,1
LinkButtonWidth | 100 (default) | Width of image in pixels, when LinkType is Button, Graphic, or Icon
LinkButtonHeight | 100 (default) | Height of image in pixels, when LinkType is Button, Graphic, or Icon
LinkButtonText | Text:ALink (default for ALinks) | Text: followed by a label for the button, when LinkType=Button
LinkButtonGraphic | Bitmap:mybutton.bmp | Bitmap: followed by the file name of the graphic, when LinkType=Graphic ; must be .bmp
LinkButtonIcon | Icon:myicon.ico | Icon: followed by the file name of the icon, when LinkType=Icon; must have extension .ico
LinkText | Related Topics | Text: followed by text to use for the link when LinkType=Text
LinkTextFont | Helvetica,10,,PLAIN | Font to use when LinkType=Text; syntax is the same as for PopFont (see §18.5 Creating pop-ups for HTML Help)

Previous Topic: 18.7.2 Adding ALink and KLink jumps for HTML Help

Next Topic: 18.7.4 Rolling your own macros for ALink jumps in HTML Help

Parent Topic: 18.7 Creating related-topic links for HTML Help

Sibling Topics:

18.7.1 Adding ALink keywords for HTML Help

18.7.2 Adding ALink and KLink jumps for HTML Help

18.7.4 Rolling your own macros for ALink jumps in HTML Help

18.7.5 Using the same format for ALink keywords and jumps

18.7.6 Creating buttons for other types of related-topic links

Table of Contents • Index