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 मिनट