Use condition presets id1825FL004PN
You can define attributes in your DITA topics and the use the condition preset to specify what happens with the attribute in the final output. For example, you can add attributes as version 1.0 and version 2.0 in your content, and use a condition preset to include version 1.0 for release 1.0 and exclude version 2.0. Similarly, you can add attributes as OS Windows and OS Linux to your content, and then include or exclude the relevant content for your final output according to the operating system.
You can create condition presets in two ways:
- From the Web Editor: Allows you to create and manage the condition presets for a DITA map from the Web Editor.
- From the map dashboard: Allows you to create and manage the condition presets for a DITA map from the map dashboard.
Condition presets from the Web Editor
Experience Manager Guides allows you to manage condition presets from the Web Editor and use them within the Output presets to generate the final output.
You can create and view the condition presets, view the attributes, and manage the actions for the current map from the Condition Presets view in the Web Editor.
{width="800"}
Create a condition preset
The Condition Presets view provides detailed information about the condition presets, such as their attributes, values, and the actions.
You can create a condition preset of the topics by performing the following steps:
-
In the Repository panel, open the DITA map file in Map View.
-
Select the Manage tab.
-
Select Condition Presets on the left. The list of conditions presets defined for the DITA map is displayed.
-
Select the + icon next to Condition Presets to open the New Condition Preset dialog.
-
Enter a unique name for the preset.
note note NOTE You view an error if the name field is empty or if you enter an Invalid character or a name that is the same as an existing condition preset. You can use a hyphen ‘-’ or underscore ‘_’ as a separator. -
Select Create.
The new condition preset is added to the list. -
Double-click a condition preset to view the attributes and the actions.
The Attributes panel shows all the attributes added to any references present in the map. The right panel shows only the conditions that you have added to the condition presets. -
Do any of the following to add the attributes:
- Select one or more attributes to add all the values under them to the condition preset. For example, you can select the
platform
attribute to add all its values. - Select one or more attribute values to add them to the condition preset. For example, you can select the
Unix
andWin
values of the platform attribute - Select any attribute and value pair and drag it to the center panel. For example, you can select the
Unix
value of the platform attribute and drag it. - Select all to add all the attributes and their values to the condition preset.
By default, the action for an attribute isInclude
.
- Select one or more attributes to add all the values under them to the condition preset. For example, you can select the
-
Select Add. You can repeat this step to add more attributes. The attributes that you add move from the central to the right panel.
-
Select Remove from the actions bar on the top to remove the selected attributes in the right panel.
-
(Optional) If required, you can override the action applied to the attributes.
Do one of the following:-
For any attribute, select one of the following actions from the Action drop-down.
- Include
- Exclude
- Passthrough
- Flag
-
Select multiple attribute rows from the right panel and choose an action from the actions bar on the top. For example, you can select Exclude action for the selected attributes.
-
-
Select Save to save the condition preset.
note note NOTE You view a warning if you select another preset or close the preset without saving it.
Once you create a condition preset, it appears under the Condition Presets dropdown of the Output presets. Learn more about how to Publish PDF output.
Rename a condition preset
Perform the following steps to rename a condition preset:
- Hover over a condition preset from the Condition Presets panel.
- Select Rename from the Options menu to open the Rename condition preset dialog.
- Edit the name of the condition preset.
- Click Rename.
Duplicate a condition preset
Perform the following steps to duplicate a condition preset:
-
Hover over a condition preset from the Condition Presets panel.
-
Select Duplicate from the Options menu to open the Duplicate condition preset dialog.
note note NOTE The default name of the preset is <selected condition preset name>_1
. You can change the name according to your requirements. -
Click Duplicate.
Delete condition preset
Perform the following steps to delete condition presets:
- Hover over a condition preset from the Condition Presets panel.
- Select Delete from the Options menu to open the Delete condition preset dialog.
- Click Delete.
Condition presets from the map dashboard
Create a condition preset
Perform the following steps to create a condition preset:
-
Select Condition Presets tab in the DITA map console.
-
Click Create button.
-
Enter a name for the preset in Name Condition.
-
Select one of the following default actions from Set default action to drop-down:
- Include
- Exclude
- Passthrough
- Flag
The action is set as default action for all the attributes whether they are added to the condition preset or not.
For example, you have 15 condition attributes in your document and you have included four of them in the condition preset. If you select exclude as default action, it is applied to all 15 attributes.
-
Do any of the following to add the attributes:
- Click Add to one attribute to the condition preset. You can repeat this step to add more attributes.
- Click Add all to add all the attributes to the condition preset.
-
(Optional) If required, you can override the default action applied to the attributes in Step 4. Do one of the following:
- Select multiple attributes, choose an action from Set the action for selected conditions to, and click Apply.
- Select an action for an attribute from the Action drop-down.
-
Click Save.
Edit a condition preset
You can make changes in an existing condition preset to change the actions applied to the attributes in the condition preset. Perform the following steps to edit a condition preset:
- Select Condition Presets tab in the DITA map console.
- Click Edit button.
- Make required changes for all the attributes in the condition preset.
- Click Save.
Create a copy of a condition preset
You can create a copy of a condition preset and then modify it according to your requirement. Perform the following steps to create a copy of a condition preset:
-
Select Condition Presets tab in the DITA map console.
-
Click Duplicate button.
note note NOTE The default name of the preset is <selected condition preset name>_Duplicate
You can change the name according to your requirement.
-
(Optional) Make required changes for all the attributes in the condition preset.
-
Click Save.
Delete condition preset
You can delete one or more condition presets from the Condition Preset tab of the DITA map console. Perform the following steps to delete condition presets:
- Select Condition Presets tab in the DITA map console.
- Select the condition preset(s) that you want to delete.
- Click Remove button.
- Click Remove to confirm the action.
Parent topic:Output generation