I am wondering if there is a way (even via a plugin) to have one widget execute other widgets. So within a widget I could do something like this:
$my_custom_extension.ExecuteWidget($fragmentId)
I am wondering if there is a way (even via a plugin) to have one widget execute other widgets. So within a widget I could do something like this:
$my_custom_extension.ExecuteWidget($fragmentId)
There isn't a way for a widget to execute other widgets, however, a widget can execute an automation via the manual execution options if the goal is to reuse scripts/code.
would it be possible to use a IScriptablePlugin and somehow call controller.RenderContent and pass in a fragmentId?
A scriptable plugin can only render its own widget(s) and it would incur more plumbing:
vs Automation:
I actually wanted it to render UI components.
Running an automation from a widget doesn't prevent that. The only limitation is that the response from the automation is a string (so an interactive object cannot be returned) though that would be the same as rendering a widget from a widget. It's the same scripting APIs, just with fewer required expectations (automations can't generally assume that there is contextual HTTP request data).