The Conditional Redirect is a special control. In response to a trigger condition, it changes the current page view of users. An example: when someone rings the doorbell, the view switches to a page showing the door camera image.
The control is invisible on the page. However, it must be added to every page from which a redirect is to take place.
Approaches
There are two ways to use the control:
- One control per redirect. You control from which pages the redirect is possible by placing the control only on those pages.
- Multiple redirects in one control. You place the control on all pages and restrict the individual redirects using the source page restriction.
Setup
- In the Controls dialog, create a control of type Conditional Redirect.
- Assign a Name.
- Click Add page selection condition.
- Edit the condition (see below) and confirm it.
- If there are multiple conditions, arrange their order using drag and drop. The topmost condition takes precedence.
- Confirm the dialog.
- Add the control to the pages from which it should redirect.
Each condition can be edited and deleted in the list.
Page Selection Condition
In the Edit page selection condition dialog, at least the target and the trigger must be defined. The other restrictions are optional.
| Field | Meaning | Note |
|---|---|---|
| Name | Name of the condition | Appears in the list. |
| Target type | Type of target | X2B Visu/List, URL/Weblink or Back. |
| X2B page | Target page | Only for X2B Visu/List. |
| URL | Target address | Only for URL/Weblink. Complete with protocol (https://), as in the browser. |
| Trigger | Formula expression that triggers the redirect when it becomes true (1) |
Must contain at least one channel. Only evaluated when an element in it changes. |
| Block | Formula expression that suppresses the redirect | Applies if it is true when the trigger condition occurs. Leave empty if not needed. |
| Dead time | Time span after a trigger during which renewed triggering is prevented | |
| Groups | User group restriction | Empty = applies to all users. Otherwise only to members of at least one group. |
| Sources | Source page restriction | Empty = redirect from any page. Otherwise only if the user is on one of the pages. |
You add groups and source pages with Add user group restriction and Add source page restriction respectively.
Notes and Limitations
- If several conditions apply at the same time, the control uses the one defined furthest up that is permitted for the user's page.
- If there are several redirect controls on one page and permitted conditions trigger in two or more of them, the redirect executed is unpredictable.
- The Back target (to the previous view) exists in the code; the help only mentions page and URL.
- The default size of the control is Invisible.
See Also
- Controls
- Weblink
- Back Button
- Camera Control

