Configuring a Trigger to Set an Asset Live Upon Creation

Beginner

17 Dec 2015   Triggers

This example will configure a Trigger to set an asset's Status to Live when it is created. This can be especially useful for File asset types that you do not require editing after being initially uploaded.

Please note that if you have Edit+ for Squiz Matrix installed on your system, the trigger settings required will differ due to the way Edit+ handles the creation of files. Please refer to the appropriate sections below, based on your configuration requirements.

You won't be able to use triggers that automatically set the status on assets that have workflow applied. You will need to either select to not include these trigger types, or to not have workflow applied to these areas of your system.

Bookmarks to the headings on this page:

  1. Administration Mode
  2. Edit+ for Squiz Matrix

Administration Mode

To configure a trigger to set an asset's status to Live when it is created in the Administration back-end interface, 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.

    The Details section (Administration Mode)
    The Details section of the Trigger

  3. In the Events section, select the Asset Created event. This will mean that the trigger will be fired when an asset is created.
  4. In the Conditions section, select the Interface Mode condition and click Commit. The configuration fields for this condition are shown in the figure below.

    The Interface Mode condition
    The Interface Mode condition

    In the fields available, select the Backend Interface option.
  5. In the Conditions section, select the Tree Location condition and click Commit. The configuration fields for this condition are shown in the figure below.

    The Tree Location condition
    The Tree Location condition

    In the Asset is Under Any One of These Locations field, select the asset(s) that the trigger should fire under.
  6. In the Conditions section, select the Asset is of Type condition and click Commit. The configuration fields for this condition are shown in the figure below.

    The Asset is of Type condition
    The Asset is of Type condition

    In the Match any one of these Types field, select the asset types that you want this trigger to apply to. For example, selecting File in this field and clicking the Inherit option will specify that this trigger will be run on all File asset types.
  7. In the Actions section, select the Set Status action and click Commit. The configuration fields for this action are shown in the figure below.

    The Set Status action
    The Set Status action

    In the Set the Asset's Status to field, select Live. Select the Ignore Permissions field to allow Squiz Matrix to ignore the access rights of the user/s firing this trigger when performing this action.
  8. When you are satisfied with the settings of this Trigger, change its Status to Enabled and click Commit.

When an asset (of the specified asset type) is created in the Administration interface, its status will now be automatically set to Live.

Edit+ for Squiz Matrix

To configure a trigger to set an asset's status to Live when it is created in Edit+ for Squiz Matrix, 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.

    The Details section (Edit Plus for Squiz Matrix)
    The Details section of the Trigger

  3. In the Events section, select the Simple Edit Accessed event. This will mean that the trigger will be fired when a user views an asset in Edit+ for Squiz Matrix.
  4. In the Conditions section, select the URL Matches condition and click Commit. The configuration fields for this condition are shown in the figure below.

    The URL Matches condition
    The URL Matches condition

    In the URL Pattern field, enter file_create=true, and then enable the Must be in URL option.
  5. In the Conditions section, select the Tree Location condition and click Commit. The configuration fields for this condition are shown in the figure below.

    The Tree Location condition
    The Tree Location condition

    In the Asset is Under Any One of These Locations field, select the asset(s) that the trigger should fire under.
  6. In the Conditions section, select the Asset is of type condition and click Commit. The configuration fields for this condition are shown in the figure below.

    The Asset is of Type condition
    The Asset is of Type condition

    In the Match Any One of These Types field, select Image.
  7. In the Actions section, select the Set Status action and click Commit. The configuration fields for this action are shown in the figure below.

    The Set Status action
    The Set Status Action

    In the Set the Asset's Status to field, select Live. Select the Ignore Permissions field to allow Squiz Matrix to ignore the access rights of the user/s firing this trigger when performing this action.
  8. When you are satisfied with the settings of this Trigger, change its Status to Enabled and click Commit.

When an asset (of the specified asset type) is created in Edit+ for Squiz Matrix, its status will now be automatically set to Live.

Write a Tutorial

Help us build a healthy library of useful tutorials for the Matrix Community.

Get in Touch

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.