Add is_expanded property to menu links

Created on 17 June 2019, almost 6 years ago
Updated 5 June 2025, 9 days ago

I added the following line (in bold below) to MenuItems.php, so I could determine if a link had the expanded flag set.

// Build the link item.
$simplifiedLink = [
'text' => $item->link->getTitle(),
'url' => $item->link->getUrlObject()->toString(),
'active_trail' => FALSE,
'active' => FALSE,
'is_expanded' => $item->link->isExpanded(),
];

✨ Feature request
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States philbNV

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡³πŸ‡±Netherlands ndf Amsterdam

    Hi, I've updated the patch.

    Now 1 thing is changed; the addition of the expanded property.

    In the original #3 patch there were some extra lines removed, probably unintentionally.

Production build 0.71.5 2024