Send email via trigger on content change based on context


(Hopkinsd1) #1

Hello,

 

My website has two contexts English and Welsh and I need to try and keep the content of both in sync, so decided to create a trigger that would notify me when an assets English content has been changed.

 

So my trigger is set up as follows:

  • Event - Asset content changed
  • Condition - URL matches with a value of '/cy/'
  • Actions - Send email trigger action

It works as intended most of the time however when using the edit plus interface at /_edit I have noticed that changing contexts doesn't update the URL. So if I'm on an English page  and change context to Welsh, the URL wont get updated meaning that '/cy/' wont be in the URL and the trigger will send an email.

 

I don't want the trigger to send emails when the Welsh context is being changed, is there any other way of doing this?

 

Thanks

David

 


(Bart Banda) #2

Hmm, not sure. Didn't think URL matching on context URL in admin would work either, as you just edit under 1 URL. 

 

What about if you look at the net panel using your browser dev tools to see what actually gets submitted as part of the _edit interface API call? There might be a POST variable there that you can check for instead of using URL matches condition?