此页面暂无简体中文版本,现以英文显示。
Choose the right extension point
A five-question decision tree that tells you whether you need a content pack, a theme, a plugin, a core change or just a webhook.
Before you write code, walk through the decision tree from the plugin developer guide. Most “I need X added” requests end at step 3 or step 5.
Is it text, pages, products or FAQs with no behaviour? → a content pack (schema in
src/lib/content-packs/types.ts).Is it a new look or sample site for a type of business? → a business pack or theme (
src/lib/business/), not a plugin.Does it react to something that happens (an invoice is sent, a ticket is opened), add a page, a dashboard card, a scheduled task, a setting or a small table of its own? → a plugin.
Does it change how an existing core screen or document works (invoice editor, checkout, PDF layout, sidebar structure)? → a core module change through the built-in module pipeline. A plugin cannot reach into core UI; write the stand-alone part as a plugin first.
Does it only need an external system to be told? → a webhook endpoint (no code in zmle at all).
| Request | Answer |
|---|---|
| “Post every new lead into our call-centre tool” | Webhook on inquiry.created |
| “Create leads from our own landing page” | REST API: POST /api/v1/inquiries |
| “Plan a site visit when a quotation is sent and list visits on a page” | Plugin with the quotation.sent hook and an admin page |
| “Block invoices above a limit until they are approved” | Plugin with the invoice.beforeIssue filter |
| “Add 50 FAQ answers and legal pages for a new market” | Content pack |
| “Change the columns of the invoice PDF” | Core module change |
quotation.sent and a plugin hook named quotation.sent receive the same data.Selling it to other businesses?
- Only looks (colours, fonts, header / footer)? → a marketplace theme.
- A section on the website (cards, banner, countdown)? → a widget. No server code; a script runs in a sealed frame without network.
- A complete website for a trade, or a printed design? → an industry or document template.
- Talks to another service, needs network, background processing or your own server? → an integration: your code runs on your servers with the scopes and events the owner approves.
- A feature inside the workspace that only needs the workspace's own events and a small store? → a plugin (SDK only, read line by line, shipped with a platform release).
Written from: docs/PLUGIN-DEVELOPER-GUIDE.md, src/lib/content-packs/types.ts, src/lib/business/types.ts, src/lib/integrations/events.ts, docs/DEVELOPERS/README.md