Problem/Motivation

The block is printed when there are no entries. Perhaps this is the expected behaviour in some cases, so a boolean switch in the block configuration form might be useful?

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

thomas.frobieter created an issue. See original summary.

anybody made their first commit to this issue’s fork.

anybody’s picture

Assigned: Unassigned » anybody

No configuration needed, should just not appear.
Instead it has the following content:

<div class="entity-submenu row gy-equal-x">
</div>

On it!

thomas.frobieter’s picture

Assigned: anybody » Unassigned

Originally it is:

<div class="entity-submenu">
</div>

"row gy-equal-x" comes from our template override.

anybody’s picture

Status: Active » Needs review

@thomas.frobieter here we go! I finally decided for a setting, if someone needs this as fallback, because I saw these lines:

// Return empty menu items array if the active trail is not in this menu.
    if (empty($this->menuActiveTrail->getActiveLink($menu_name))) {
      return $build;
    }

So maybe it was intended to be rendered sometimes, even if there are no items.
The new setting allows to use the previous behavior, if needed.

thomas.frobieter’s picture

Status: Needs review » Reviewed & tested by the community

Works well, thx!

  • anybody committed a031db2b on 8.x-1.x
    Issue #3542548 by anybody, thomas.frobieter: Hide the block when there...
anybody’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, so let's merge this.

Status: Fixed » Closed (fixed)

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