How to make widgets trigger the HTML.Render automation event

We've set up an automation rule to re-write some HTML image URLs from our old system, to where the images are stored now. It's a relatively simple replace operation, and works well within content.

However, we've noticed that when we have those URLs in our widgets, the Html.Render event isn't bring triggered.

Is there an easy way to have our automation rule apply to the body of our widgets?

As a workaround, I've found that surrounding the HTML with $core_v2_ui.Render like this..

$core_v2_ui.Render('<img src="')">myoldassetsdomain.com/.../fixed.png">')

..will cause the event to trigger, but the output ends up putting an unwanted DIV after the HTML, e.g.

Any ideas?

Parents Reply
  • Yeah, I've played with those parameters for 'target' without any luck.

    And yes, I added the code in Widget Studio, wrapping the content like this;

    But I'd really rather not have to touch the widget code at all.. I'd rather the display of widget bodies either go through the Html.Render event, or have their own render event that I hook into in the Automation rules engine. That or I can intercept their render in C# & do it in a plugin instead.

Children