Rule
Rules are the core element of Contexta, and they are what gives it its remarkable flexibility.
Each rule has two parts: a text part and the condition under which it is displayed.
Text part
Here you write what should be shown in the Widget: a comment, links to additional information, a form that connects to an external data source (API), or anything else.
You can use tag values in the text part. For example, if your purchase_price tag contains the purchase price of your product, then this text
Purchase price: {[purchase_price]} USD
will show the purchase price in the Widget.
Conditions for showing this text
We have defined the tags into which the Widget passes data from the page. These tags and their values are used here. Conditions are how you define when the text you entered above should be shown.
For example, if you want to show a tip to a manager when they sell an expensive product from manufacturer X, the rule looks like this:

Note that the two conditions are joined with “AND”.
This means the text is shown only if both the first AND the second condition are met.
That is, if the manufacturer is X but the product price is less than N, the rule does not fire.
You can also group conditions with “OR”. For example, this is how the rule “show the text for all Apple products priced above 3000, or for any products priced above 10,000” looks:

How to create a new rule
This follows the Contexta data structure: Blocks contain rule Groups, and Groups contain the Rules themselves. So go to the Block where you want to place the rule (or create a new one). Then, in the same way, select an existing rule Group or create a new one. To create a rule, click the “Add rule” button in the open window of any rule Group.

Rule settings
Information display conditions
The “Information display conditions” field specifies the criteria for the site pages on which the rule is displayed. These can be product or service characteristics, parts of the URL, and much more. For more on conditions and rules, see here.
Display period
In the “Display period” section, you can set the start and end dates for displaying the information. This is useful for temporary information, such as a promotion. By default, the “Show always” checkbox is selected, which means the text is displayed in the Context block immediately after the rule is created and until the rule is paused or deleted.
Settings
In the “Settings” section, you can select the “Show last modified date” checkbox. The Context block then shows the date of the last edit in addition to the rule text, which can be useful for information whose relevance changes over time. The “Inform about changes” checkbox sends notifications.
Rule comments
Rule types
Contexta has the following rule types:
Text
A universal rule for displaying text or hyperlinks to external resources or other pages of the site in the Context block on the site.

In the “Information” field, enter the text to display in the rule or create a hyperlink. The text editor provides various tools for formatting text.

Tag content in the rule text
You can also display the content of any tag in the rule text. For example, if a tag returns the product’s stock level and you want to show it to a manager.
Widget
With this rule type, you can create something like a “frame” to embed in the Context block. You can edit HTML, CSS and JavaScript code. This opens up many possibilities, such as creating buttons in the Context block.

API
Contexta can request and display information via API. Just specify the URL for requests.

Bulk actions on rules
The same operations are available for rules as for rule Groups: copying, moving, pausing and deleting.

Copying a rule
To copy a rule, select it with the checkbox and click the “Copy” icon.
Moving a rule
To move a rule to another Block, select it with the checkbox and click the “Move” icon.
Pausing a rule
To pause a rule, select it with the checkbox and click the “Pause” icon.
Deleting a rule
To delete a rule, select it with the checkbox and click the “Delete” icon.