Plug in API Menu Items - czcorpus/kontext GitHub Wiki

Plug-ins / [menu_items]

interface: plugins.abstract.menu_items.AbstractMenuItems type: required

# AbstractMenuItems.get_items(menu_section, lang)

Returns custom menu items which will be appended to the existing ones. The method should never raise an exception when asked for non-existing undefined sections.

arguments:

  • menu_section -- an identifier of a section (see main_menu module in lib)
  • lang -- a language+country (e.g. 'en_US') or language (eng. 'cs') code

returns:

  • a list/tuple of plugin.abstract.menu_items.MenuItem instances