mirror of
https://github.com/inventree/inventree-docs.git
synced 2025-04-27 21:26:43 +00:00
parent
ca1e47315d
commit
1f6b30faa0
@ -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.
|
||||
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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user