About Arbortext Styler > Generating Indexes > Configuring Multiple Indexes for a Document > Conditional Inclusion of an Index Term in an Index
Conditional Inclusion of an Index Term in an Index
To include index terms in an index only when a specific condition matches, configure index terms in a slightly different way. For example, you may want to include a chapter title as an index term when the chapter is in Spanish:
1. Configure the index term elements and their roles as usual, based on one of the Element, Nesting Element or Attribute models.
2. Style the element given the Index Term (Model) style as Hidden.
3. Create the contexts and/or conditions where the element is to be included in an index. For example, title in chapter IF attribute “xml:lang”of parent element = ”es”.
4. For this title in chapter context, insert an index term element in the Add Before generated text.
5. Set the generated index term to include the current element content.