Instalacja modułu
composer require 'drupal/menu_trail_by_path:^2.2'
vendor/bin/drush en -y menu_trail_by_path
DDEV
ddev composer require 'drupal/menu_trail_by_path:^2.2'
ddev drush en -y menu_trail_by_path
Menu Trail By Path sets the active-trail on menu items according to the current url.
For example if you are at yoursite.com/blog/category1/article1
Menu Items with these paths will get the active-trail class on them and expand accordingly.
blog
blog/category1
blog/category1/article1