Widgets and blocks
Build dashboard widgets from a plugin, understand how page-builder blocks are stored and rendered, and sell website sections as marketplace widgets.
اسباق
ڈویلپر اسباق انگریزی میں لکھے گئے ہیں: کوڈ، API کے نام اور فائلوں کے نام ہر جگہ انگریزی میں ہوتے ہیں۔
- Dashboard widgets from a pluginDeclare a widget in module.json, render plain data in register(), and let the dashboard draw, validate and sanitise it.تقریباً 8 منٹ
- Widget kinds, HTML sanitising and the dashboard filterThe four data kinds, tones and links, which HTML survives, and how the dashboard.widgets filter hides widgets per user.تقریباً 7 منٹ
- Page-builder blocksHow pages are stored as block JSON, which block types exist, and what adding a new block involves (a core change, not a plugin).تقریباً 9 منٹ
- Marketplace widgets: fields, template and CSSA widget.json is data: typed fields the owner fills, a logic-less always-escaped template and CSS that the platform scopes to the block. No widget code runs on the server.تقریباً 9 منٹ
- Widget scripts in a sealed frameA widget with a script renders inside a sandboxed iframe with its own policy: it reads the owner's values from window.WIDGET and has no network, cookies or access to the page.تقریباً 6 منٹ