From 1f6b30faa0d5836d4bc194d7690a4356c4485ad4 Mon Sep 17 00:00:00 2001 From: Bben <47628473+Bbillyben@users.noreply.github.com> Date: Tue, 15 Nov 2022 22:09:50 +0100 Subject: [PATCH] Panel mixin template (#392) * Update panel.md * Update panel.md --- docs/extend/plugins/panel.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/extend/plugins/panel.md b/docs/extend/plugins/panel.md index 07788a4..656f8bb 100644 --- a/docs/extend/plugins/panel.md +++ b/docs/extend/plugins/panel.md @@ -18,10 +18,21 @@ Each plugin which implements this mixin can return zero or more custom panels fo Panel content can be rendered by returning HTML directly, or by rendering from a template file. + +Each plugin can register templates simply by providing a 'templates' directory in its root path. + +The convention is that each 'templates' directory contains a subdirectory with the same name as the plugin : + * e.g. templates/myplugin/my_template.html + + +In this case, the template can then be loaded (from any plugin!) by loading "myplugin/my_template.html". + + + ### Javascript Custom code can be provided which will run when the particular panel is first loaded (by selecting it from the side menu). ## Example Implementation -Refer to the `CustomPanelSample` example class in the `./plugin/samples/integration/` directory, for a fully worked example of how custom UI panels can be implemented. \ No newline at end of file +Refer to the `CustomPanelSample` example class in the `./plugin/samples/integration/` directory, for a fully worked example of how custom UI panels can be implemented.