Conditional Keywords Screen

Last Updated: 17 Dec 2015

On each of the Type Formats Bodycopy, the Conditional Keywords screen can be found. This screen allows you to specify conditions that must be satisfied for a section of your content to be displayed. If the condition is not satisfied, the appropriate section of content is not displayed to the user.

Bookmarks to the headings on this page:

  1. Using a Conditional Keyword

The Conditional Keywords section of the Conditional Keywords screen is shown in the figure below.

5-0-0_conditional-keywords-section.png
The Conditional Keywords section of the Conditional Keywords screen  

To add a condition select the type of condition you want to use from the Condition Type list and click Commit. Additional fields will then appear on the screen allowing you to configure that condition. You can add as many conditions as you want.  

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. For example, you can specify that the content will be shown if the browser the user is using is Internet Explore. To do this, select The following server variable matches the specified pattern from the list provided, enter HTTP_USER_AGENT into the Server Variable field and enter MSIE into the Pattern field.
  • 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. For example, you can specify that the content will be shown if the browser the user is using is Internet Explore. To do this, select The user agent string matches the pattern from the list provided and enter MSIE into the User Agent Pattern field.
  • 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.

Using a Conditional Keyword

Once you have set up a condition on the Conditional Keywords screen, a number of keyword replacements will be available on the Edit Contents screen of the Bodycopy. These keyword replacements allow you to configure the content so that only certain areas will be visible if certain conditions are met and are as follows:

  • Begin <condition name>: if the condition is true, the content that is shown between this keyword replacement and either the keyword replacement Else <condition name> or End <condition name> will be shown.
  • Full Structure for <condition name>: this keyword replacement will add the keyword replacements Begin <condition name>, Else <condition name> and End <condition name> in the WYSIWYG Editor. You can then add the required content in between these keyword replacements.
  • <condition name>: this will show 1 if the condition is true or 0 if it is false.
  • Else <condition name>: if the condition is false, the content that is shown between this keyword replacement and the keyword replacement End <condition name> will be shown. This keyword replacement is optional
  • End <condition name>: use this keyword replacement to indicate where the conditional content ends.

Please note <condition name> is the name of the condition on the Conditional Keywords screen.
An example of the conditional keyword replacement structure is shown in the figure below.

5-0-0_wysiwyg-editor-conditional-keyword-structure.png
An example Conditional Keyword structure in the WYSIWYG Editor

PreviousFinish


Previous Chapter