Conditions
In DITA, conditions are often driven through attributes such as Product, Platform, and Audience. These can also have specific values assigned to them. Users can control all of this through Folder Profiles.
Sample files that you may opt to use for this lesson are provided in the file conditions.zip.
Assign conditions to a Folder Profile
-
Select the Folder Profiles tile.
-
Click Conditional Attributes.
-
Click Edit in the top left corner of the profile.
-
Click Add.
-
Complete the required fields.
-
The Name should correspond to an attribute used for profiling.
-
The Value is the exact entry that will be used in the DITA code source.
-
The Label is the word that will be seen by the user who is entering attributes.
-
-
Click Save.
Assign attributes to elements
If no custom Folder Profile has been assigned to a concept, you may wish to assign attributes to specific elements, such as paragraphs.
-
From the Repository View, click on the element you want to work with to select it.
-
In the Content Properties panel, click on the Attribute dropdown.
-
Choose the attribute you wish to assign.
-
Add a Value.
The attribute and value pairing are now assigned to the selected element.
Assign attribute and value pairings using conditions
The Conditions panel allows controlled assignment of Attribute and Value pairings.
-
Modify the User Preferences.
a. Click the User Preferences icon.
b. Complete the required fields in the User Preferences dialog. For example:
c. Click Save.
-
From the conditions panel, expand the dropdowns for Audience and Platform. Note that the available conditions are Folder Profile-specific.
-
Drag and drop a condition onto the desired element to assign it.
Assign a Subject Scheme
Subject Scheme maps are a specialized form of ditamap and are referenced by a map. Subject Schemes are used to define taxonomies. They provide control over the values available.
-
Navigate to the Repository View.
-
Select a map that references the Subject Scheme ditamap. This example uses the map called Design and Layout.
-
Configure User Preferences.
a. Click the User Preferences icon.
b. Populate the fields in the User Preferences dialog.
c. Click the folder symbol next to the Base Path field to choose the path to the desired file.
d. Click Select.
e. Click the key symbol next to the Root Map field to enter a path.
note important IMPORTANT Important: the selected Root Map must be the map that contains the Subject Scheme. f. Restrict the displayed assets by selecting the folder(s) you want to use.
g. Click Select.
h. Click Save.
The Subject Scheme has now been assigned.
View the Subject Scheme from the Conditions panel
-
Navigate to Editor Settings.
-
Select the Conditions tab.
-
Check the box Show subject scheme in the Conditions panel