From 4c1ba0fd0b2e13bd539181d0c51a55cf8ccd7535 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 27 Apr 2015 16:10:23 +0200 Subject: [PATCH] [doc] => --- src/octoprint/plugin/types.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/octoprint/plugin/types.py b/src/octoprint/plugin/types.py index 6349781c..aa4b8fe2 100644 --- a/src/octoprint/plugin/types.py +++ b/src/octoprint/plugin/types.py @@ -181,7 +181,7 @@ class TemplatePlugin(OctoPrintPlugin, ReloadNeedingPlugin): The right part of the navigation bar located at the top of the UI can be enriched with additional links. Note that with the current implementation, plugins will always be located *to the left* of the existing links. - The included template must be called ``_navbar.jinja2`` (e.g. ``myplugin_navbar.jinja2``) unless + The included template must be called ``_navbar.jinja2`` (e.g. ``myplugin_navbar.jinja2``) unless overridden by the configuration supplied through :func:`get_template_configs`. The template will be already wrapped into the necessary structure, plugins just need to supply the pure content. The @@ -192,7 +192,7 @@ class TemplatePlugin(OctoPrintPlugin, ReloadNeedingPlugin): The left side bar containing Connection, State and Files sections can be enriched with additional sections. Note that with the current implementations, plugins will always be located *beneath* the existing sections. - The included template must be called ``_sidebar.jinja2`` (e.g. ``myplugin_sidebar.jinja2``) unless + The included template must be called ``_sidebar.jinja2`` (e.g. ``myplugin_sidebar.jinja2``) unless overridden by the configuration supplied through :func:`get_template_configs`. The template will be already wrapped into the necessary structure, plugins just need to supply the pure content. The @@ -204,7 +204,7 @@ class TemplatePlugin(OctoPrintPlugin, ReloadNeedingPlugin): plugins. Note that with the current implementation, plugins will always be located *to the right* of the existing tabs. - The included template must be called ``_tab.jinja2`` (e.g. ``myplugin_tab.jinja2``) unless + The included template must be called ``_tab.jinja2`` (e.g. ``myplugin_tab.jinja2``) unless overridden by the configuration supplied through :func:`get_template_configs`. The template will be already wrapped into the necessary structure, plugins just need to supply the pure content. The @@ -216,7 +216,7 @@ class TemplatePlugin(OctoPrintPlugin, ReloadNeedingPlugin): will always be listed beneath the "Plugins" header in the settings link list, ordered alphabetically after their displayed name. - The included template must be called ``_settings.jinja2`` (e.g. ``myplugin_settings.jinja2``) unless + The included template must be called ``_settings.jinja2`` (e.g. ``myplugin_settings.jinja2``) unless overridden by the configuration supplied through :func:`get_template_configs`. The template will be already wrapped into the necessary structure, plugins just need to supply the pure content. The @@ -272,11 +272,11 @@ class TemplatePlugin(OctoPrintPlugin, ReloadNeedingPlugin): * - template - Name of the template to inject, default value depends on the ``type``: - * ``navbar``: ``_navbar.jinja2`` - * ``sidebar``: ``_sidebar.jinja2`` - * ``tab``: ``_tab.jinja2`` - * ``settings``: ``_settings.jinja2`` - * ``generic``: ``.jinja2`` + * ``navbar``: ``_navbar.jinja2`` + * ``sidebar``: ``_sidebar.jinja2`` + * ``tab``: ``_tab.jinja2`` + * ``settings``: ``_settings.jinja2`` + * ``generic``: ``.jinja2`` * - suffix - Suffix to attach to the component identifier and the div identifier of the injected template. Will be @@ -311,7 +311,7 @@ class TemplatePlugin(OctoPrintPlugin, ReloadNeedingPlugin): (and the divs will be ``tab_plugin_myplugin_1st`` and ``tab_plugin_myplugin_2nd``). * - div - - Id for the div containing the component. If not provided, defaults to ``_plugin_`` plus + - Id for the div containing the component. If not provided, defaults to ``_plugin_`` plus the ``suffix`` if provided or required. * - replaces - Id of the component this one replaces, might be either one of the core components or a component @@ -370,7 +370,7 @@ class TemplatePlugin(OctoPrintPlugin, ReloadNeedingPlugin): .. note:: As already outlined above, each template type has a default template name (i.e. the default navbar template - of a plugin is called ``_navbar.jinja2``), which may be overridden using the template configuration. + of a plugin is called ``_navbar.jinja2``), which may be overridden using the template configuration. If a plugin needs to include more than one template of a given type, it needs to provide an entry for each of those, since the implicit default template will only be included automatically if no other templates of that type are defined.