Flatmenu

Flatmenu

Jacek Tomason -
回帖数:1

Hello,
I must create new block with breadcrumbs, user menu and setting menu (flat menu) - replace this from navbar to block.
I've done with breadcrumbs and user menu.

Breadcrumb:

$items = $this->page->navbar->get_items();
          foreach ($items as $item) {
              $breadcrumb = $item->get_content();
              $breadcrumb_child = $item->get_title();
              $breadcrumb_action = $item->action();
              $this->content->text .= '<a href=" ' . $breadcrumb_action . ' ">' . $breadcrumb . '</a>  ';
              $this->content->text .= ' / ';
          }

User menu:

echo $OUTPUT->user_menu();


But I have still big problem with setting (flat) menu. How to list content with links from there?
https://wimski.org/api/3.8/d0/d23/classflat__navigation.html
I've tried everything. Please, help..

Moodle 3.8.2
PHP 7.4.3
theme/edumy/ccn