0

I created a suggestion for menu and using menu--main-sidebar.html to render menu.

I want to include menu title (title of block added to specific region from admin side) as first child of menu

I tried to use configuration (configuration.label shows menu title in block--menu-block--main.html.twig file) like below

{{ menus.menu_links(items, attributes, menu_level, menu_name, configuration) }}

That does not work.

So, how to get the menu title inside menu_links in menu--main.html.twig file?

0

You could try using the Simplify Menu module (which extends twig to support direct access to Drupal's menus for overriding markup).

See the example in this related thread: https://drupal.stackexchange.com/a/228982/79832

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.