Difficulty adding a parent menu link in Drupal 8

by user1359   Last Updated January 10, 2018 21:07 PM

I'm creating a custom module in Drupal 8.4.4. I put several menu links under the Development menu.

  title: 'Scrape'
  parent: system.admin_config_development
  route_name: scrape.scrape_form
  description: 'Scrape content from ccad.edu'
  weight: 10

  title: 'Images Scrape'
  parent: system.admin_config_development
  route_name: scrape.scrape_images_form
  description: 'Scrape images from ccad.edu'
  weight: 20


This is working fine, but now that whole menu is getting a bit too long.

I wanted to wrap up all of my links under one 'header' link under the Development menu. I added this at the top of mymodule.links.menu.yml:

  title: 'Migration'
  description: 'Migration functions'
  parent: system.admin_config_development
  menu_name: scrape.migration
  route_name: scrape.migration

But when I try to rebuild the cache, I get this error:

The website encountered an unexpected error. Please try again later. Symfony\Component\Routing\Exception\RouteNotFoundException: Route &quot;scrape.migration&quot; does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName()

How can I make a new, non-navigable parent link under Development, to put my custom links under?

Edit 4k4's comment is correct, but my parent link is very small and greyed out.

  title: 'Migration'
  description: 'Migration functions'
  parent: system.admin_config_development
  menu_name: scrape.migration
  route_name: <nolink>

enter image description here

How can I get a full-height, dark-font header link?

Tags : 8 links

Related Questions

Protect Webpage from guest users in drupal

Updated December 01, 2017 10:07 AM

Add content are not correctly re-parented

Updated March 10, 2016 07:03 AM

How to replace authentication links

Updated December 07, 2017 23:07 PM

Link field with Browse Server button

Updated April 13, 2015 20:03 PM

How do I create a link?

Updated April 09, 2016 08:03 AM