Configuring a Trigger to Prevent Image Assets From Being Created

Intermediate

17 Dec 2015   Triggers

This example will configure a Trigger to prevent users from creating  Image assets under our Site asset, displaying an error message to them instead.

To configure this Trigger, follow the steps outlined below. 

  1. Create a new Trigger asset.
  2. Enter a Name and Description for the Trigger, as shown in the figure below.     

       Details section
    The Details section of the Trigger     

  3. In the Events section, select the Before Asset Created Trigger Event.
  4. In the Conditions section, select the Tree Location Trigger Condition and click Commit. Additional fields will appear in the Conditions section, as shown in the figure below.

       Tree Location Trigger Condition
    Thee Tree Location Trigger Condition     

    In the Asset is Under field, select the Site asset.
  5. In the Conditions section, select the Asset is of type Trigger Condition and click Commit. Additional fields will appear in the Conditions section, as shown in the figure below.

       Asset is of Type Trigger Condition
    The Asset is of Type Trigger Condition     

    In the Match any one of these Types field, select Image.
  6. In the Actions section, select the Fail Trigger Action and click Commit. Additional fields will appear in the Actions section, as shown in the figure below.     

       Fail Trigger Action
     The Fail Trigger Action     

    In the Trigger an error of type field, select Error and enter an error message that will appear, for example Images should be created under the Media Folder in the Asset Map.
  7. When you are satisfied with the settings of this Trigger, change its Status to Enabled and click Commit.

When a user tries to create an Image asset under the Site asset, an error message will now appear and the system will not create the image.