Relatude Help

Rules for plugins

  • Never bundle the shared modules. relatudePlugin() leaves them out. A second React breaks every hook, and a second SDK has its own useCms() context, which no shell provides.
  • Begin every id with the plugin's name. Blade ids share one namespace, and a blade registered later replaces an earlier one with the same id.
  • Read cms.store where you use it, and expect null in the offline demo.
  • Values are keyed by CodeName, case-sensitively: node.values.Name and n.Name.
  • A blade's state is its param. The address keeps the blade's id and param, nothing else.
  • activate is not awaited. Work it starts runs beside the interface's own start, and the plugin must catch its errors.
  • A button is not access control. The API lets every signed-in user write, unless CmsApiOptions.Authorize says otherwise (chapter 17). Put rules on the server, where a plugin cannot leave them out.