Using Triggers to Delete Standard Page Assets


(Nick Papadatos) #1

Matrix Version: 5.4.3.2

Has anyone been able (not sure if my request is possible) to place a standard page asset to Under Construction after 3 days using a trigger?

Step 1:
set future status to under construction (standard page) within a certain folder (tree location) greater than 3 days to under construction.

Step 2:
All standard pages within that folder with the status of under construction move to trash

I think the first step is possible but cannot find anything on the community site about moving assets to trash using triggers.

Possible?

Cheers
Nick


(Tbaatar) #2

Hi,

It should be possible. Have a look into the Create Link action.

You can unlink from existing parent and move it to Trash.


(Nick Papadatos) #3

I think I need 2 x triggers
First to set future status to under construction and the second to look for status change then move to trash via the create link action with Unlink this asset from all its existing parents checked.

Cheers
N


(Tbaatar) #4

Hi Nick,

You can do it with 1 trigger for trashing. As you say you will need another trigger to change the future status to Under Construction.

For Trashing Trigger:

Event - After Status Changed
Condition - Asset Status Being Changed To
Action - Create Link (Link Asset to Trash, Unlink Asset From Existing Parent)


(Nick Papadatos) #5

Thanks tbaatar - it’s what I ended up doing so thank your assistance
N