Adding a filter to Layout Elements

Topics: Customizing Orchard
Aug 13, 2015 at 7:21 PM
We are currently using a filter that implements the IHtmlFilter to filter html content on the page and add speedbumps to URLs that lead offsite. This works great, but now we need to extend this to media elements. We have a custom slider element that adds a url option to the image items being placed within it. The slides with links work but the custom filter for html content does not filter the content in the slider element and add the speedbump. Is there a way to add a custom filter to elements as well? Or should I be looking into a different method of accomplishing this? Thank you.

Note: for the time being I could add code to the slider element that will test the urls and add a speedbump if needed but then I would have to do this to every element that the current filter doesn't work with.
Aug 13, 2015 at 8:14 PM
Haha, spoke too soon. The HtmlElement can be used as an example of how to accomplish what I wanted. I had to tweak my code a little but it's working now.
Marked as answer by emeraldarcher on 8/13/2015 at 1:14 PM