18.7.3.1 Assigning replacement code
In the [ExtrReplace] section you can assign HTML code, including macros, to the ExtrStart format or ExtrStart marker, whichever you used to designate the start of the extract. The code you assign replaces the entire extract in the parent file. For example:
; doc format = HTML code to use instead of extracted para
Heading2=<$YourMacroForTheReplacement>
If you need different replacements for different extracts, you could either use different starting formats, or you could use an ExtrReplace marker to specify replacement code for a particular extract; the marker takes precedence over anything you specify in the [ExtrReplace] section.
You can use several predefined macro variables in replacement code to reference the replaced extract file, the extract title, and the first graphic in the extract. Table 18-8 lists the variables you can use in extract replacement code. Also, predefined macro <$_extrthumb> provides a convenient way to include scaled thumbnails of graphics as replacement links; see §18.7.3.2.3 Providing scaled thumbnails.
Table 18-8 Predefined macro variables for extract replacement code
For example, the following code uses a thumbnail graphic to link to an extract:
FigCaption=Contents ExtrStart Title
<p class="thumbnail"><a href="<$$_extrfile>">
<img src="<$$_extrgraph>" alt="<$$_extrtitle>" /></a></p>
See §18.7.3.2 Using thumbnails for links to illustrations in HTML.
> 18 Splitting and extracting files > 18.7 Customizing and replacing extracts > 18.7.3 Replacing extracts with links in the parent file > 18.7.3.1 Assigning replacement code