Load menu items from one menu in other menu I want to load the menu items from the main menu in a other menu. I've read a dozen examples but I can't get it to render the items at all.

Here's my code from my_theme.theme

function my_theme_menu__secondary(&amp;$menu, &amp;$menu_name, &amp;$suggestions) {
  $menu_name = 'main';
  $menu_tree = \Drupal::menuTree();
  $parameters = new \Drupal\Core\Menu\MenuTreeParameters();
  $parameters-&gt;onlyEnabledLinks();
//  $parameters-&gt;setMinDepth(2)();
//  $parameters-&gt;setMaxDepth(2)();

  $tree = $menu_tree-&gt;load($menu_name, $parameters);
  $manipulators = array(
    array('callable' =&gt; 'menu.default_tree_manipulators:checkAccess'),
    array('callable' =&gt; 'menu.default_tree_manipulators:generateIndexAndSort'),
  );

  $tree = $menu_tree-&gt;transform($tree, $manipulators);

  $list = [];

  foreach ($tree as $item) {
    $title = $item-&gt;link-&gt;getTitle();
    $url = $item-&gt;link-&gt;getUrlObject();
    $list[] = Drupal\Core\Link::fromTextAndUrl($title, $url);
  }

  return $list;
}


Heres my menu--secondary.html.twig

{% import _self as menus %}

{{ menus.menu_links(items, attributes, 0) }}

{% macro menu_links(items, attributes, menu_level) %}
  {% import _self as menus %}
  {% if list %}
    {% for item in list %}
      {%
        set item_classes = [
          'expanded',
          'dropdown',
          item.in_active_trail ? 'active',
        ]
      %}
      {% if menu_level == 0  %}
        &lt;li{{ item.attributes.addClass(item_classes) }}&gt;
        &lt;a href="{{ item.url }}"&gt;{{ item.title }}&lt;/a&gt;
        &lt;/li&gt;
      {% endif %}
    {% endfor %}
  {% endif %}
{% endmacro %}


Any help is appreciated :)
you can add new module twig tweak, after rendering blocks menu with Twig Tweak on template.