Add ability to check if has megamenu by type

Created on 22 September 2023, about 1 year ago

Problem/Motivation

In twig when checking for {% if has_megamenu(item.url) %} it would be nice to be able to optionally specify a type, and have it check against that. This would allow for multiple megamenu entity types to used in a template.

Proposed resolution

{% if has_megamenu(item.url, 'overview_panel') %} would be the proposed function, where the 'overview_panel' would be an optional machine name of the megamenu type. This would return TRUE if there is an attached megamenu of this type, and FALSE otherwise.

✨ Feature request
Status

Active

Version

2.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States bkildow

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024