diff --git a/docs/extend/plugins.md b/docs/extend/plugins.md index 7484da3..f0c2679 100644 --- a/docs/extend/plugins.md +++ b/docs/extend/plugins.md @@ -62,10 +62,10 @@ Supported mixin classes are: - [EventMixin](./plugins/event.md) - [LabelPrintingMixin](./plugins/label.md) - [NavigationMixin](./plugins/navigation.md) +- [PanelMixin](./plugins/panel.md) - [ScheduleMixin](./plugins/schedule.md) - [SettingsMixin](./plugins/settings.md) - [UrlsMixin](./plugins/urls.md) -- [PanelMixin](./plugins/panel.md) ## Installing a Plugin diff --git a/docs/extend/plugins/panel.md b/docs/extend/plugins/panel.md index c1abc0a..07788a4 100644 --- a/docs/extend/plugins/panel.md +++ b/docs/extend/plugins/panel.md @@ -11,3 +11,17 @@ Most pages in the web interface support multiple panels, which are selected via {% with id="panels", url="plugin/panels.png", description="Display panels" %} {% include 'img.html' %} {% endwith %} + +Each plugin which implements this mixin can return zero or more custom panels for a particular page. The plugin can decide (at runtime) which panels it wishes to render. This determination can be made based on the page routing, the item being viewed, the particular user, or other considerations. + +### Panel Content + +Panel content can be rendered by returning HTML directly, or by rendering from a template file. + +### 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 diff --git a/mkdocs.yml b/mkdocs.yml index c7d1929..e31f449 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -130,6 +130,7 @@ nav: - Event Mixin: extend/plugins/event.md - Label Printing Mixin: extend/plugins/label.md - Navigation Mixin: extend/plugins/navigation.md + - Panel Mixin: extend/plugins/panel.md - Schedule Mixin: extend/plugins/schedule.md - Settings Mixin: extend/plugins/settings.md - URL Mixin: extend/plugins/urls.md