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 মিনিট