Flatmenu

Flatmenu

by Jacek Tomason -
Number of replies: 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

Average of ratings: -
In reply to Jacek Tomason

Re: Flatmenu

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

[moving the topic from the Plugins traffic to the General developer forum]