Conditionally hiding/displaying paragraph styles

  • mburpo 3 years, 6 months ago

    Is it possible to create a paragraph style that I can conditionally hide or display from selected build Targets?

    It looks like I can do that for character styles, but not for paragraph styles. In D2H, from the Project tab > Topic Types > Character Styles, I can create a character style that has a Conditional Text Behavior. Then, in the Condition section, I can select which targets I want to conditionally hide that text from (using the Targets drop-down list). But there doesn’t appear to be similar functionality for the Paragraph Styles from that window. Has anyone else figured out how to do that?

    I know something close to this is possible within Word using the Conditional Text button on the D2H toolbar, but our goal is to create conditional paragraph styles in a similar way to the conditional character styles. Any tips?

  • 6p
    S.Kamprowski6p 3 years, 6 months ago


    You may already know that you can create your own styles, and add them to the styles in your project, paragraph styles as well as character styles.
    By choosing the property Hidden you will make the paragraphs formatted with that style be removed from all targets, while choosing the property Online Help will remove the paragraphs in manual targets only. This is not as comfortable as conditional text, I know.
    If you want to remove whole topics I suggest to use the Condition property in the Topic Properties dialog (preferable in the source document). This property accepts the same conditions as conditional text.

    Don’t know whether this helps :) .

    Sabine Kamprowski

  • EstelleOlvera 3 years, 6 months ago

    (I work with Melissa.) Unfortunately, Hidden and Online Help won’t do it, and we need a style-driven solution for our implementation.

    Is there a way to apply attributes using the Behavior – Script feature? That would give us wonderful style-driven control…

  • EstelleOlvera 3 years, 6 months ago

    To clarify: since these scripts run after, perhaps a script to say "If target = foo, hide this element"?

  • 6p
    S.Kamprowski6p 3 years, 6 months ago


    actually, I don’t know a way to assign conditions with attributes to a paragraph style. Maybe one of the C1′s guys has a solution. Perhaps it helps to find a solution if you would explain why you don’t use character styles resp. topic properties.

    Sabine Kamprowski

  • EstelleOlvera 3 years, 6 months ago

    Sure. We do use character styles to handle a lot of conditional needs, but that only gets us half way. We need a solution on the paragraph or topic-type level to let us suppress complex chunks of character-formatted content from specific targets.

    Because of how we author in our Agile environment, it works best to have the conditional information stored and versioned inside the Word files themselves, rather than the topic properties (stored in the D2H database). A style-driven solution lets us make it obvious to casual authors/reviewers of source files where the conditional bits are in play.

  • -1p
    Nicky Bleiel-1p 3 years, 6 months ago

    Hi Mary –

    Could you please clarify a little for me?

    Doc-To-Help already lets you mark text as conditional, so you can exclude/include anything you want from a target.

    It seems like you need a solution that will make conditional text very obvious to those editing documents and you would like to do that with Paragraph Styles. Is that correct?

    You can add a VB Script to a Paragraph Style, but I am not sure this is the right approach to solve that problem.


  • 6p
    S.Kamprowski6p 3 years, 6 months ago

    Hello Mary,

    you may add conditions on topic level inside your source documents: simply click the topic properties button in the D2H ribbon, where the condition section offers you the same options as with conditional text. The difference is that it applies to a complete topic, instead of marked text.

    Sabine Kamprowski

  • 4p
    Dan Beall4p 3 years, 5 months ago

    You will be happy to know that we plan to add the ability to apply conditions to paragraph styles in the next release (August).

  • mburpo 3 years, 5 months ago

    That’s great news – thanks Dan!

  • EstelleOlvera 3 years, 5 months ago

    Fabulous timing! Thanks so much!

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.