Widget Rules are used to define rules for hiding or showing of widgets based on the selected logical rule. Widget rules leverages logical rules, it mean we can use the logical rules for defining widget rules. Below are the widget rule features.
- Hide or Show widgets: Widgets can be shown as hidden based on the defined logical rule.
- Widgets by Role: You might be having a common use case of hiding some widgets for a specific role in such case define a logical rule using “User Role” criteria and use it in widget rule.
- Widgets for Guest User : One more common common use case of hiding some widgets from Guest user(Not logged in User) and these widgets should be available for logged in user, in such cases define a rule using “User Profile” criteria.
- Widgets for Home Page: Widgets for home can be achieved by defining a logical rule on Home Page and leveraging it in Widget rule.
- Widgets by Date and Time: There might be situation where you might be interested in showing special widgets like “New Year” or “Christmas”or “Year End Sales” discounts widget and these widget should be available for only few days or months, in such cases define a Logical rule using “Date and Time” criteria.
You can use Date, Time, Day of Week and Month sub criteria to further refine the rule.
- Widgets by Geo Location: If you want to hide or append information for request which are coming from a specific geographic location country or continent then define a logical rule using “Geo Location” Criteria.
- Activate or deactivate widget rule: Widget can be activated or deactivated. If the rule is deactivated the action pertaining to the rule will not be performed.
Using rules engine we can define lot more simple and complex rules
Simple User Cases:
- Widgets by User Id.
- Widgets by Request URL.
- Widgets by Date, Time, Month and Day of the week.
- Widgets for Tablet device.
- Widgets for Mobile phone.
- Widgets for Pages
Complex Use Cases :
Define complex rule using logical “and” “or” and “brackets”
- Widgets by User Role and Date and Time
- Widgets by User Role and Geo location
- Widgets by User Role, Geo location and Date and Time
- Widgets by User Role, Geo location, Device and Date and Time
- Widgets by User Role, Geo location, Device or Request URL and Date and Time and More …