Plug in API Application Bar - czcorpus/kontext GitHub Wiki
Plug-ins / [application_bar]
- type: optional
- interface: plugins.abstract.appbar.AbstractApplicationBar
- client-side code: -
- purpose: generates an HTML code for a custom page header
This plug-in allows injecting a custom HTML code into KonText layout heading. It is typically used to present some kind of a common toolbar shared accross multiple applications provided by an organization.
Server-side
# AbstractApplicationBar.get_fallback_content()
Returns an alternative content for situations when KonText cannot fetch the regular contents via get_contents() method. For example, a client-side script trying to fetch the contents via AJAX can be injected here.
# AbstractApplicationBar.get_contents(plugin_api, return_url)
arguments:
- plugin_api -- a controller.PluginApi instance
- return_url -- where should application bar's linked pages return the user (if they can)
Obtains an HTML content to be injected into KonText layout.
Client-side
See public/files/js/types/plugins.d.ts for details