Creating and Using Attributes
Attributes make it possible to assign user-defined build criteria to text, topics, documents, and styles, which makes it possible to single-source one project several different ways. For example, you could create both an Administrator and Manager version of a manual and/or Help system from the same project.
Doc-To-Help has two default build attributes built in: Internal and Release.
- Open the Project ribbon.
- From the Project ribbon group, click Attributes. The Attributes dialog opens.
- Click the Add New Attribute button. An attribute named "NewAttribute" appears in the list.
-
Provide a name for the attribute. The NewAttribute name will initially be editable. If you wish to change it later, select it, then click the Edit (pencil) icon.
Example
An example of an attribute name would be "Audience." The Audience attribute would then need values.
- Click the Add New Value button. The new value appears in the list.
-
Replace the default text. The Value name will initially be editable. If you wish to change it later, select it, then click the Edit (pencil) icon.
Example
An example of attribute values for the Audience attribute would be "Pharmacist" and "Nurse."
Note After creating an attribute, you can assign it as any of the following:
- Text See Marking Text as Conditional.
- Topics See Setting Topic Conditions.
- Documents See Finding Projects Containing a Source Document.
- Select the Target ribbon, and click the Target Properties button. The Help Targets dialog opens.
- On the left side of the dialog, select a target.
-
Click the drop-down on the Attributes field and choose the appropriate attribute(s) or create a custom expression.
- Click the Attributes tab to assign one or more attributes to the target. Select the check box(es) next to the appropriate attributes. The attributes chosen will display in the Attributes field.
- Click the Expression tab to create a custom expression using your attributes. Expressions are statements that combine attributes in more complex ways. The expression created will display in the Attributes field.
After a particular target is built, the text, topic, or document flagged with those attributes will appear in the output.