2
0
mirror of https://github.com/inventree/inventree-docs.git synced 2025-04-28 05:36:46 +00:00

Panel mixin template (#392)

* Update panel.md

* Update panel.md
This commit is contained in:
Bben 2022-11-15 22:09:50 +01:00 committed by GitHub
parent ca1e47315d
commit 1f6b30faa0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,6 +18,17 @@ 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. 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 ### Javascript
Custom code can be provided which will run when the particular panel is first loaded (by selecting it from the side menu). Custom code can be provided which will run when the particular panel is first loaded (by selecting it from the side menu).