9.7.5.4 Building an ALink button object from an ALink keyword list
When it comes time to output an ALink button for a topic, the following macro is invoked to process list variable $$AlinkKeys (see §9.7.5.1 Creating a list of ALink keywords from paragraphs or §9.7.5.2 Creating a list of ALink keywords from markers) and add each keyword to the button object:
<$ALinkButtonStart><$$ALinkParamNum=1>\
<$$ALinkParamText=$$ALinkKeys[$$ALinkParamNum]>\
<$$ALinkParamNum++><$ALinkButtonParam>\
[AlinkButton] uses two additional macro variables:
$$ALinkParamNum is initialized to 1, and then incremented before each keyword parameter is added to the button object, because the "ItemN" keyword parameters for the button object start with N=2, not N=1 (see §9.7.4 Rolling your own macros for ALink jumps in HTML Help).
[AlinkButton] invokes three other macros to build the button object:
Start of button object: [ALinkButtonStart]
Keyword parameters: [ALinkButtonParam]
End of button object: [ALinkButtonEnd]
The first part of the ALink button object is straightforward, and uses the same code described in §9.7.4 Rolling your own macros for ALink jumps in HTML Help:
<object id="hhctrl" type="application/x-oleobject"
classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"
<param name="Command" value="ALink">
<param name="Button" value="Text:Related topics">
<param name="Flags" value="1">
Next come the "Item2" through "ItemN" parameters, which are added to the button object one by one, as list variable $$AlinkKeys is processed:
<param name="Item<$$ALinkParamNum>" value="<$$ALinkParamText>">
The last piece ends the button object:
This version of the [AlinkButton] macro assumes that each item in the $$ALinkKeys list contains a single ALink keyword. To process a list that contains multiple keywords per list item, you would need a slightly more complex version; see §9.7.5.6 Including multiple ALink keywords in a paragraph or marker.
§9.7.5.5 Positioning the ALink button in each HTML Help topic
> 9 Generating Microsoft HTML Help > 9.7 Creating related-topic links for HTML Help > 9.7.5 Using the same format or marker for ALink keywords and jumps > 9.7.5.4 Building an ALink button object from an ALink keyword list