Omni Systems, Inc.

  

Mif2Go User's Guide, Version 55

  

Valid HTML 4.01!

 

Made with Mif2Go

19 Creating HTML links > 19.3 Specifying link destination > 19.3.4 Providing alternate link destinations


19.3.4 Providing alternate link destinations

You can use a macro to place a copy of a paragraph ID or a cross-reference ID somewhere in the generated HTML code other than immediately before the content of the paragraph in question. Two predefined macro variables capture the values of these Mif2Go-generated IDs:

[spacer]

<$$_parauid>

Paragraph ID of the current paragraph

<$$_xrefid>

Cross-reference ID (if any) of the current paragraph

Each returns what would normally go in the <a name=...> tag:

[spacer]

Xaannnnnn

for a paragraph ID

Raannnnn

for the ID of the first cross-reference marker in a paragraph

where:

[spacer]

aa

is the FileID of the HTML file (provided [HTMLOptions]UseFileIDs=Yes, which is the default)

nnnnnnn

is the ObjectID of the paragraph or cross reference.

For example, if the anchor Mif2Go creates from the first cross-reference marker in a paragraph looks like this:

<a name="Rxxaa39983">

The value of <$$_xrefid> for that paragraph would be:

Rxxaa39983

Note:  FrameMaker ObjectIDs can change; see §19.3.3 Linking to an arbitrary location.

See §5.3 Identifying files and objects.

Move a jump destination

Suppose you want to display something (perhaps a table, a link, or a graphic) above a mid-topic (non-split) heading, so that jumps to that heading show the preceding something at the top of the window, above the heading.

You could use [ParaStyleCodeBefore] to place HTML code just before the content of each such mid-topic heading, and include a copy of the paragraph ID (or cross-reference marker ID) in that code. This would force hypertext jumps (or cross references) to the paragraph to go to the preceding code instead of to the paragraph content. Whatever is produced by that code would then appear at the top of the window when you click a link to the paragraph.

For example, to precede a mid-topic heading with a one-cell table containing a link back to a local TOC:

[HTMLParaStyles]

SubHead=CodeBefore

[ParaStyleCodeBefore]

SubHead=<p><a name="<$$_xrefid>"></a></p><$BackToTOC>

[BackToTOC]

<table cellpadding="5" border="1" cellspacing="2">

<tr>

<td><font size=-3><a href="#contents">Contents</a></font></td>

</tr>

</table>

Clicking a cross-reference link to any SubHead paragraph would show a box containing a link to Contents above the SubHead paragraph.

See also:

§28.3.4 Using predefined macro variables

§28.9.3 Surrounding or replacing text with code or macros



19 Creating HTML links > 19.3 Specifying link destination > 19.3.4 Providing alternate link destinations