In this article, we cover how to define the navigation to the entities page details.
Topic covered here:
- What's entity navigation?
- What are navigation rules?
- How does the FORGE Page Builder execute multiple navigation rules for an entity type?
- External links
- Managed and unmanageable inconsistencies
What's entity navigation?
Within FORGE, content is arranged into distinct entity types, such as stories or albums. The entity navigation defines which page an entity of a specific type must render through navigation rules.
What are navigation rules?
Navigation rules decide when a page should show a certain type of content (entity type).
The following fields define a navigation rule:
- Entity type: The type of content (entity type) the page should show.
-
Conditions: The set of conditions that define the navigation rule. Each condition has:
- Attribute: The name of the entity's attribute to compare with the Value field.
-
Operator: How to compare the expected attribute value with the actual value. Operator can value:
- 'is': Equals the Value field.
- 'is not': Differs from the Value field.
- 'has a value': The attribute has a non-empty value.
- Value: It's the expected attribute's value to match the condition.
- Page: The target page that renders the entity. It can be a page defined within the FORGE Page Builder or an external page.
- Description (optional): The navigation rule's description.
How does the FORGE Page Builder execute multiple navigation rules for an entity type?
Producers can create many navigation rules per entity type. This allows the rendering of the same entity types like different stories, with different pages based on various conditions.
In this case, the FORGE Page Builder executes navigation rules in order of condition number:
- The execution starts from the navigation rule with the most conditions. If conditions don't match, the execution steps into the next navigation rule with the most matching conditions, and so on.
- When conditions match, execution runs the navigation rule and stops.
Warning: There's a scenario that makes the execution random. Read it about the Managed and unmanageable inconsistencies — it's the third inconsistency — and avoid it!
External links
Navigation rules can also target pages defined outside the FORGE Page Builder. In this case, the parametrization of the destination page URL is outside the FORGE control.
Managed and unmanageable inconsistencies
Defining navigation rules might lead to two possible managed inconsistencies:
- Ambiguous target page: Two navigation rules have the same entity type and conditions but different target pages. This scenario makes it ambiguous which page the navigation must target, so an error message prevents the creation of the second navigation rule.
-
Unpublished target page: The navigation rule targets an unpublished page.
This scenario makes the navigation rule inactive: the FORGE Page Builder ignores it, and a warning message highlights that the navigation rule is inactive.
Finally, there's an unmanageable inconsistency that you must avoid:
-
Undetermined target page: Two or more navigation rules have the same entity type and condition number. This scenario makes it undetermined what is the navigation rule to execute first, and the execution gets random.
Warning: Avoid this scenario!