Render Macros with Controller actions

I understand that marcos are reusable components and I think they’re great. From my understanding, macros are setup by pointing to a HTML file which can read the macros paramters and use that to display content.

However, is it possible for the macros to render a controller action result instead? Let’s say I have a controller called WidgetsController, and I wanted my macros to render and return the HTML of the ContentCard Action result?

I want to be able to execute custom code from a controller action, so for example I can call an API to get a set of results that would be used as data for my macros view.


This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/92155-render-macros-with-controller-actions