Under maintenance

Heretto Help

Show Page Sections

Develop Conditional Content

You can publish deliverables for different audiences by applying conditional processing attributes to the DITA content and filtering it with DITAVALs during publication.

  1. Develop content.
  2. Apply conditional processing by doing any of the following:
    • Add conditional processing attributes to topic elements.
    • Add conditional processing attributes to map elements.
  3. Create relevant DITAVALs.
    Remember: Ensure you create DITAVALs for all the conditions you're using.
  4. Preview or filter content in Content Editor or publish it with each DITAVAL that you created in 3.
    Important: Your publishing scenarios may need some configuration to enable you to select DITAVALs for publications. If there is no args.filter or ditaval option in the publishing scenario that you want to use, contact your Heretto CCMS Administrator or Customer Success Manager.
Open and inspect the deliverables to ensure the content filters worked as expected.

Profile Topic Elements

Use the Content Editor to apply conditional processing attributesto elements in a topic for conditional publishing.

The default conditional processing attributes are: audience, rev, platform, product, props, and otherprops.
  1. In the Content Library double-click a topic or a map.
  2. Place your cursor in the element you want to set a conditional processing attribute values on.
    Note: We recommend profiling grammatically independent elements, not individual words or phrases. This is especially important when localizing the content, since at least a complete sentence provides sufficient context for accurate translation memory and machine translation matching. This is true even if you reuse text across alternative elements for different conditions. When localizing content, it's always best to think of it grammatically first, then structurally.
  3. Click Attributes to open the Attributes tab.
  4. Navigate to the conditional processing attribute that you want to define, for example audience.
  5. Enter the values for each conditional processing attribute that defines the condition to which the profiled content applies.
    Tip: To add multiple values for conditional processing attributes, insert a space between each value.
  6. Press the Enter keyboard key to apply attribute values.
Depending on the action defined for a specific value at publish time, content is either flagged, excluded, or included. If you do not specify an action for a specific value, the default is to include the content (unless your publishing profile sets the default to exclude).

Profile Map Elements

Use the Content Editor to set conditional processing attribute values and profile an entire topic (topicref element) or a submap (mapref element) for conditional publishing.

The default conditional processing attributes are: audience, rev, platform, product, props, and otherprops.
Note: When you apply a conditional processing attribute to a parent topic (topicref element), the same attribute applies to all children of that topic.
  1. In the Content Library, double-click a map.
  2. In the left pane, hover over the element you want to set the conditional processing attributes for and click the wrench icon.
  3. Enter the values for each conditional processing attribute that defines the condition to which the profiled content applies.
    Tip: To add multiple values for conditional processing attributes, insert a space between each value.

Create a DITAVal

Create a DITAVAL containing include or exclude rules to filter content at publish or during editing.

  1. In the Content Library, navigate to a folder and click Create New.
  2. Select DITAVal to open the Create new window.
  3. Add a meaningful file name.
    Note:

    The valid characters for file and folder names are:

    • lowercase letters (a-z)

    • uppercase letters (A-Z)

    • numbers (0-9)

    • underscore (_), hyphen (-), and period (.)

    This applies to creating files and folders and renaming files and folders.

  4. Optional: Save the file in a folder different from the current folder by clicking Change and selecting a new location.
  5. Optional: Assign the file to collections by clicking Collections and selecting collections from the list.
  6. Optional: Assign metadata to the file by filling in the Metadata fields.
  7. Click Create & Edit.
  8. Edit or remove the default property, or click Add Prop to add a new action.
You can use this DITAVAL to publish or filter your content as you edit or review files in your Content Library. For more information, see Filter Content in Content Editor with a DITAVAL and Create an Assignment.

Preview Profiled Content in Content Editor

While editing a topic in the Content Editor, you can view the topic with conditional content as it would display in the final, filtered output.

  1. In the Content Library double-click a topic or a map.
  2. Go to an element with a conditional processing attribute value set.
    Conditional processing values display as a label in the left margin of the Content Editor.
    Layer 1
  3. Click a label and, in the Conditional View Settings dialog, do any of the following:
    • To gray out the profiled content, select grayed.
    • To hide the profiled content, select hidden.
    • To show the profiled content, select show.
    The "europe" processing attribute is set to "grayed"
  4. Click Apply.

The content is grayed out or hidden in the Content Editor. When you close the file, the default conditional view setting of show is restored for all values.

Filter Content in Content Editor with a DITAVAL

Use a DITAVAL to filter conditional content as you're previewing and editing files. This enables you to preview and edit files with conditional content, included or excluded depending on your DITAVAL, as they would display in the final output. For example, if your DITAVAL excludes content with the Audience conditional processing attribute set to internal, then any content with this value applied will not display when previewing or editing a file.
  1. In the Map Editor, from the Context drop-down menu, select Add a ditaval filter.
  2. Navigate to and select a DITAVAL.
  3. Click Select.
When editing or previewing content in the Content Editor, your conditional content renders based on rules in the selected DITAVAL.
Note:

The Context menu settings are cleared as soon as you close the map.

Add a DITAVAL to a Map

You can add a DITAVAL file to a map to ensure it is always used when the map is published or output previewed with PDF Generator. We recommend adding a DITAVAL to a map when it is the only DITAVAL that applies to that map. If the map needs to be published with different DITAVAL files, do not add any of them to the map.
  1. In the Content Library, navigate to and open a map.
  2. In the bottom-left corner, click Open Library and navigate to the DITAVAL file you want to add to the map.
  3. Drag and drop the DITAVAL file into the map tree.

    We recommend adding DITAVAL files at the end of the map.

    A gif showing how a user clicks the Open Library button then drags and drops a ditaval file from the content library in the map tree

Your map contains a ditavalref element that references the DITAVAL file. For example:

<ditavalref href="_Global_Shared/DITAVALs/user-guide-customer-facing-online.ditaval"/>

When publishing the map or previewing it with PDF Generator, filters in the DITAVAL file are automatically applied to content.