Excluding Content Not Linked Directly or Indirectly From Targets

One way to completely exclude content from online output is to place condition tags on the topic files and include or exclude them from the targets (see Conditions). Another method—discussed here—is to use an option in the Target Editor to include only content files that are directly or indirectly referenced from the target. This means that if the target is using particular files such as a table of contents (TOCs), master page, and so on, other files linked directly or indirectly from them will be part of the output.

How to Exclude Content Not Linked Directly or Indirectly From a Target

  1. Open a target used for online output.
  2. On the Advanced tab of the Target Editor, select Exclude content not linked directly or indirectly from the target.
  3. Click to save your work.

Example Your target points to a TOC that includes Topic A, Topic B, and Topic C. If you generate an online output and use this option in the Target Editor, all three of those topics will be included in the output. In addition, Topic D will be included in the output. Although Topic D is not found in the TOC, a cross-reference to it is found in Topic B; therefore, it is linked to the TOC (and the target) indirectly. However, Topic E is not included in the output, because it is not found in the TOC and none of the topics to be included in the output contain a link to it.

Example You have four topics in your project: Topic A, Topic B, Topic C, and Topic D.

Topic A, Topic B, and Topic C have been included in your TOC. Topic D has not been included, and it does not contain any links to or from any other topics.

Furthermore, let's say you want to use the "list-of" proxy feature to automatically generate a list of all H2 headings in the project (see Creating a List of Elements). All four of the topics have H2 headings in them, and you've inserted the List-Of proxy somewhere in Topic A.

So what happens when you generate the output?

If the "Exclude" target option is not enabled in the target, all four topics will be included in the output. In addition, the generated list of H2 headings will show heading text from all four of those topics.

However, if the "Exclude" target option is enabled, only Topic A, Topic B, and Topic C will be included in the output. This also means that the generated list of H2 headings will show heading text only from those three topics. The H2 heading text from Topic D will not be included.

Example Your primary target explicitly links to the following:

  • A TOC
  • A browse sequence
  • A stylesheet
  • One or more glossary files
  • A master page
  • A startup topic

A target can also link explicitly to one or more relationship tables and one alias file. However, these files are not used to determine whether files should be included when this "Exclude…" target option is enabled.

  • The TOC and the browse sequence can link to topics, other TOCs, or other browse sequences. These files would then be included. You could even place a link to multimedia from a TOC or browse sequence if you wanted (although this cannot be done in the Flare user interface). It will work and those explicitly linked resources would also be included.
  • A stylesheet may link to image resources. These resources are included.
  • A glossary file may link explicitly to a topic if a term uses a topic as its definition. These topics are included.
  • A master page may link to a topic or resource (image/multimedia). These linked items would be included.
  • The startup topic is, of course, included.
  • Any included topic can explicitly link to additional topics via hyperlinks, cross-references, image maps, or related topics controls (not concept links or keyword links).

Using this option can help prevent bloated output by excluding unused files.

Example You have 1000 images in your project, but only 500 of them are used in the Microsoft HTML Help output you want to generate. By using this feature, only those 500 images are included in the output, thus keeping the output file size down to a minimum.