#### 13.8.1.3 Replacing page numbers with symbols or images

You cannot just remove page numbers from an index when you convert index entries to HTML, because there are often multiple page numbers for each entry. Instead, to suppress page numbers you have to replace them with something big enough to click on. Here is one way:

1. In the FrameMaker IX file, define a new character format; for example, IXpgnum.

2. On the IX Reference page of the IX file, find the line with paragraph format IndexIX, which contains the <$pagenum> element, and apply character format IXpgnum to the entire line.

3. Save the index file, and generate the book. In the Body pages of the resulting index file, you will see that the page numbers are still links but the index text is not, just as before; so locked FrameMaker documents and PDF files are unaffected.

4. In the configuration file, specify the following settings for the character format you applied:

[HTMLCharStyles]

IXpgnum= KeepLink CodeReplace

The CodeReplace property indicates that all text with character-format IXpgnum will be replaced by HTML code assigned to IXpgnum in the [CharStyleCodeReplace] section.

The KeepLink property retains the first hypertext link in the replaced text.

5. Specify HTML code for the character you want to use instead of a page number:

[CharStyleCodeReplace]

IXpgnum=<b>&#182;</b>

The IXpgnum=<b>&#182;</b> setting in this example gives you a bold paragraph symbol in place of the page number, but you can use any replacement you please. For example, you could specify the following setting (using XHTML conventions):

[CharStyleCodeReplace]

IXpgnum=<img src="page.gif" alt="" />

This setting replaces the page number with an image. Because the resulting HTML must repeat this code fragment for every index item in the document, keep the image file name very short; perhaps just p.gif.

To apply KeepLink to all [HTMLCharStyles]CodeReplace character formats listed in [CharStyleCodeReplace]:

[HTMLOptions]

; KeepReplacedCharLinks = No (default) or Yes (retain hotspot href

; when CodeReplace is used for a char format, meant for IX pagenums

; and equivalent to setting KeepLink for all char-fmt CodeReplace

; settings)

KeepReplacedCharLinks=Yes

This way you do not need to set KeepLink individually for each character format.

| 13.8.1.2 Including markers other than Index |  | 13.8.1.4 Making index entries into links |