Learn how to best define your variant rules to create the outcomes you need.
Variant rules determine which pages of your document end up being included or excluded from a specific variant.
This article summarizes some tips and tricks for how to best define variant rules and helps you correct invalid rules.
Create a variant that includes all pages
If one of your variants should include all pages of your documentation page tree, you could create a new label and add it to all pages of your page tree.
To save time, we recommend setting up the following rule instead:
Select “does not have label”
In the label field, enter a completely new label name (e.g. one that matches your variant name) or a label that isn’t or won’t be used in any other variant rule
Troubleshooting invalid rules
Problem | Solution |
---|
The variant page tree is empty, because the root page is not in the variant. | The root page needs to be included in all variants. To do you have two options: Option 1 Option 2 |
Some pages match the variant rule(s) but are excluded because not all their ancestors are in the variant. | Add a label to the parent page (ancestor) as well. |