cms
cms copied to clipboard
CP marks all nav items with external links as "current"
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
- Extend nav
- Create nav item with external URL
- 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