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
  • It may be worth either setting up a server-side redirect via your web server or making use of a bot to find out of date references by scanning your community and identifying areas that require changes vs. a global pre-render re-routing automation. Then you'd be fixing it once and be done. 

    While you could implement a plugin that could review/filter the output of every page rendering, it's a lot of overhead to incur to handle a clean-up/migration task.

Children