Can conditional links be based on user roles or audience profiles in DITA?

Customizing DITA documentation based on user roles or audience profiles is a powerful way to deliver tailored content to different user segments. Conditional links in DITA allow you to achieve this personalization by specifying conditions that are based on user roles, audience profiles, or other criteria.

Conditional Attributes

In DITA, conditional processing attributes like ‘props’ and ‘audience’ can be applied to elements such as links. These attributes enable content authors to set conditions based on user roles or audience profiles. For instance, a link to advanced technical documentation can be made visible only to users with the ‘admin’ role, while the same link might be hidden for ‘standard’ users. Conditional attributes provide fine-grained control over the content that different users see.

Authoring Example

Here’s an example illustrating how conditional links based on user roles can be authored in DITA:

<link href="admin-manual.dita" props="role=admin"/><!-- Links to the admin manual for users with the 'admin' role. -->

In this example, the ‘props’ attribute specifies the condition based on the user role ‘admin.’ Only users with the ‘admin’ role will see this link, while others will not. This approach allows content personalization for distinct user groups within the same documentation.