cms icon indicating copy to clipboard operation
cms copied to clipboard

CP marks all nav items with external links as "current"

Open MariusSpring opened this issue 3 years ago • 0 comments

Bug description

When extending the CP's navigation, and adding nav items that have an external url, they are marked as "current".

The example below will always have the "current" class added to it when rendered in the CP's sidebar:

public function boot()
{
    Nav::extend(function ($nav) {
        $nav->create('Test')
            ->section('Test Section')
            ->url('https:/google.com/some-link')
            ->icon('icon');
}

How to reproduce

  1. Extend nav
  2. Create nav item with external URL
  3. Open CP and see it there marked as "current"

Logs

No response

Versions

Statamic 3.3.16 Pro Laravel 8.83.16 PHP 8.1.3 doublethreedigital/runway 2.3.9 spatie/statamic-health 1.0.0 statamic/collaboration 0.4.0

Installation

Existing Laravel app

Antlers Parser

runtime (new)

Additional details

No response

MariusSpring avatar Jun 16 '22 10:06 MariusSpring