Conditions

Last Updated: 17 Dec 2015

This entire chapter refers to a feature that was added in version 5.0.0

The Conditions screen allows you to create and configure conditions that can be used to dynamically present content on your sites based on whether these conditions are met.

Bookmarks to the headings on this page:

  1. Conditions

To add a new condition, select the type of condition you want to add from the Condition Type list in the Create New Condition section and click Commit. Additional fields will then appear in the Conditions section of the screen, allowing you to configure the newly added condition. You can add as many conditions as you like.

The conditions available are:

  • Admin Access: the user has or does not have Admin access to the front-end asset.
  • Asset Status: the current asset is or is not a specified Status.
  • Asset Type: the current asset is or is not one of a specified set of asset types.
  • Entry Page: the entry page of the user matches or does not match a specified set of URL patterns and/or asset IDs.
  • Form Posted: the form has or has not been posted.
  • Has Children: the current asset has or does not have children that match a specified set of asset and link types.
  • In User Group: the user is or is not in a specified set of User Groups.
  • Keyword Regexp: a specified keyword matches or does not match a specified pattern. This condition supports the use of custom keywords.
  • Logged In: the user is or is not logged in.
  • Logical: a specified combination of keywords with a logical grouping rule evaluates to TRUE or FALSE. This condition supports the use of custom keywords.
  • Page Referrer: the page referrer URL matches or does not match one of a specified set of URL patterns.
  • Server Variable: a specified server variable matches or does not match a specified pattern.
  • Simple Edit Mode: the user is or is not using the Simple Edit Interface (including Edit+ for Squiz Matrix). 
  • Site Referrer: the site referrer URL matches or does not match one of a specified set of URL patterns.
  • User Agent: the user agent string matches or does not match a specified pattern.
  • User Frequency: a specified amount of time or activity (hit/session/days/hours/minutes) has or has not passed.
  • User IP: the user's IP address matches or does not match a specified pattern.
  • User IPv6: the user's IPv6 address matches or does not match a specified pattern.
  • User Type: the user is or is not one of a specified set of user types.
  • Visited Pages: any previously visited pages match or does not match one of a set of specified URL patterns and/or asset IDs.
  • Write Access: the user has or does not have Write access to the front-end asset.

Conditions

This section allows you to configure the conditions created on your asset.

By default, this section will be empty. As you add new conditions in the Add New Condition section, the fields available for these conditions will be displayed in this section. An example of this is shown in the figure below.

Additional fields in the Conditions section
Fields in the Conditions section

The fields available in this section will differ depending on the types of conditions that have been added on the asset. For more information on the condition types available, see the Create New Condition section in this chapter.

The Force No Cache? field on each condition allows you to specify that any page using this condition will be served with a no-cache header, no matter what other cache rules have been configured. By default, this field in enabled. Setting this field to No will use the default cache rules that have been applied on the asset.

Once you have finished configuring the settings of the conditions listed in this section, click Commit to save your changes.

You can remove a condition from the current asset by selecting Delete This Condition and clicking Commit.

Conditional Keywords

In addition to using conditions on the content containers of an asset, conditional keywords are also available to conditionally show or hide sections of content within a container.

Once conditions have been created and configured on the Conditions screen, an automated list of the conditional keywords available will be displayed on the content containers of the asset.

These conditional keywords allow you to dynamically configure content that is presented in accordance with the conditions set.

The format of conditional keywords are as follows, where Condition is the name of the condition configured on the Conditions screen:

  • Condition: displays whether the condition has been met, either TRUE (1) or FALSE (0).
  • Begin Condition: identifies the beginning of the conditional content to display if the condition is met. If the condition is true, the content specified between the Begin and either the Else or End keywords will be displayed.
  • Else Condition: identifies any alternative content to display if the condition is not met. If the condition is false, the content specified between the Else and End keywords will be displayed. This keyword is optional.
  • End Condition: identifies the end of the conditional content to display.
  • Full Structure of Condition: provides the full keyword structure of conditional content (BeginElse and End Condition) to allow you to easily enter the content to conditionally display.  

An example of the conditional keyword structure is shown in the figure below.

A condition keyword structure in the WYSIWYG Editor
An example conditional keyword structure 


Previous Chapter Next Chapter

The Latest

Let Us Know What You Think

Let us know if you spot any errors or if you have any ideas on how we can improve the Matrix Community Website.

Contact Squiz for Demo

Let us show you the true power of Squiz Matrix by giving you a personalised demonstration.