renderWidget
Renders a widget to HTML for troubleshooting render-pipeline issues. Use with widget ID or name to diagnose broken widgets.
Instructions
Render a widget to HTML - Diagnostic tool only. Returns BD's rendered HTML output for a widget — useful for confirming render-pipeline symptoms during troubleshoot (backslash strip on widget_data, <style> auto-wrap on widget_style, <script> wrapper presence on widget_javascript). Production widget rendering on a customer's site is always via [widget=Name] shortcode in page or email content — never call this tool to deliver widget HTML to end users.
Use when: the user reports a widget is broken and you need to see what BD's render pipeline actually emits. See Rule: Widget code fields scenario 3 (TROUBLESHOOT).
Required: either widget_id OR widget_name.
Returns (distinct from standard envelope): { status, message, name, output }. The output field contains rendered widget_data HTML with template tokens expanded, plus BD's auto-wrapped <style type='text/css'>-block from widget_style, plus the verbatim widget_javascript content. CSS and JS are NOT in output if their fields are empty.
See also: getWidget (raw source for inspecting field placement), updateWidget (apply fixes after diagnosis).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| widget_id | No | ||
| widget_name | No | Alternative to `widget_id` - pass either one. Widget name lookup is case-sensitive and must match exactly. |