Problem/Motivation

Every time something changes in the menu templates, it usually has to be propagated to all three templates:

menu.html.twig
menu--main.html.twig
menu--account.html.twig

The code can easily be copy and pasted, but that is still essentially duplicating code and continues to leave an opportunity for human error to occur.

Proposed resolution

Consolidate the menu macro in main.html.twig and use {% extends "menu.html.twig" %} in menu--main.html.twig and menu--account.html.twig.

Refactor the macro in menu.html.twig to pass classes for the <ul> element.

CommentFileSizeAuthor
#2 2936370-2.patch5.87 KBmarkhalliwell
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

markcarver created an issue. See original summary.

markhalliwell’s picture

Status: Active » Fixed
Issue tags: -Needs change record
FileSize
5.87 KB

  • markcarver committed 21562e6 on 8.x-3.x
    Issue #2936370 by markcarver: Consolidate menu macro in main template
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.