Editing menu-section file in Session Theme

Hi,

I have made a child theme of the Session Theme and I wanted to change the global partial header so I could add a simple menu that can be edited as page level.

I have done the above and I also cloned the menu-section module from the parent theme, replaced the menu with a simple one. I wanted the menu to still have a mobile menu toggle so I am doing this approach.

I get this error on this line within the menu-section file {{ renderNavigation(menu(module.primary_menu_field)) }}

Screenshot 2022-12-14 at 12.35.29.png

Does anyone have any ideas?

Thanks

Screenshot 2022-12-14 at 12.35.29.png

The Menu field and Simple Menu field return completely different data from each other so it’s not possible to just switch the two out.

The Menu field returns only an ID that when used with menu().children returns an array of tree nodes with far more information than a Simple Menu field would (activate branch, active node, tree level, etc).

The Simple Menu field returns an array of objects with much more simplified information. The key names they use aren’t even the same as what’s used in the Menu field. You would have to rewrite a good chunk of the code to make it compatible with a Simple Menu field.