Werk #11256: Extension API change: html.header and html.top_heading require breadcrumb argument

Komponente GUI
Titel Extension API change: html.header and html.top_heading require breadcrumb argument
Datum 17.07.2020
Checkmk-Editon Checkmk Raw (CRE)
Checkmk-Version 2.0.0i1
Level Kleine Änderung
Klasse Neues Feature
Kompatibilität Kompatibel - benötigt kein manuelles Eingreifen

This change is only relevant in case you have custom GUI extensions that implement custom HTML pages.

In case you do this, it is likely that you use the html.header or html.top_heading methods. Once upgrading to 1.7 you will have to update your code to hand over a breadcrumb as second argument.

This can be done like this:

from cmk.gui.plugins.main_menu.mega_menus import (
make_simple_page_breadcrumb,
MegaMenuSetup,
)

title = "My custom page"
html.header(title, make_simple_page_breadcrumb(MegaMenuSetup, title))

For more examples have a look at our code and search for the keyword breadcrumb.

Zur Liste aller Werks