Configuring a Trigger to Set an Asset Live Upon Creation
Beginner
17 Dec 2015
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:
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:
- Create a new Trigger asset.
- Enter a Name and Description for the Trigger, as shown in the figure below.
- In the Events section, select the Asset Created event. This will mean that the trigger will be fired when an asset is created.
- In the Conditions section, select the Interface Mode condition and click Commit. The configuration fields for this condition are shown in the figure below. In the fields available, select the Backend Interface option.
- In the Conditions section, select the Tree Location condition and click Commit. The configuration fields for this condition are shown in the figure below. In the Asset is Under Any One of These Locations field, select the asset(s) that the trigger should fire under.
- 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. 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.
- In the Actions section, select the Set Status action and click Commit. The configuration fields for this action are shown in the figure below. 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.
- 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:
- Create a new Trigger asset.
- Enter a Name and Description for the Trigger, as shown in the figure below.
- 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.
- In the Conditions section, select the URL Matches condition and click Commit. The configuration fields for this condition are shown in the figure below. In the URL Pattern field, enter file_create=true, and then enable the Must be in URL option.
- In the Conditions section, select the Tree Location condition and click Commit. The configuration fields for this condition are shown in the figure below. In the Asset is Under Any One of These Locations field, select the asset(s) that the trigger should fire under.
- 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. In the Match Any One of These Types field, select Image.
- In the Actions section, select the Set Status action and click Commit. The configuration fields for this action are shown in the figure below. 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.
- 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.