Add a text generated from the title of a chapter or section in the TOC
I have some titles that, through a condition, add a "NEW" image to indicate that this section is new. When I do the TOC the image added in the condition with a generated text of type suffix does not appear.
Styler's dialogs can be a little limiting in this area but you should be able to do something here without diving into edited source.
1. Find which TOC definition you are using by selecting the <toc/> element
2. Go to that definition in Styler via the TOC tab e.g. in the OOTB Docbook stylesheet it is called "Book Table of Contents"
3. With the correct TOC definition selected, click "Customize Title Contexts..."
4. From the popup dialog, find the relevant context(s) in the list and use the "Add..." button to add additional content to the TOC entries for those context(s)
5. You should see a single Text entry <_gte:ElementContent/>, click the "Edit..." button next to that field
6. Now you are in an editor for the generated TOC content. You can add the words "NEW" and refresh the Editor window or PDF just to prove to yourself that the content is appearing in your TOC.
7. Next step is how do you control when you want the NEW content to appear? In the simplest case you can Insert -> XPath String... to do some simple XPath to calculate the NEW content