I’m working on a custom module that has a couple configuration form for controlling it’s settings. I want to add a link to this form to the admin configuration UI. The new link to my settings isn’t appearing, but the form works fine if I navigate directly to it using the URL.
# stripedonation.links.menu.yml stripedonation.admin: title: 'Stripe Donation' description: 'Manage settings for strip donations' parent: system.admin_config_system # menu_name: main route_name: stripedonation.settings weight: 1
NOTE: I cleared the cache after adding this.
# stripedonation.routing.yml stripedonation.settings: path: '/admin/config/stripedonation' defaults: _form: 'DrupalstripedonationFormSettingsForm' _title: 'Stipe Donation Settings' requirements: _permission: 'administer site config'
I also tried adding the key shown below to my *.info.yml file and it didn’t help
# stripedonation.info.yml name: "Stripe Donation" type: module description: "Adds Stripe Donation form for ThinkShout vetting exercrise" package: EmersonThis core: 8.x # configure: stripedonation.settings
In case it matters…
# stripedonation.settings.yml stripe_pub_key: '' stripe_secret_key: ''
I’m expecting my menu link to show up here (but obviously it is not):
I’ve studied the following documentation:
- https://www.drupal.org/docs/8/creating-custom-modules/defining-and-using-your-own-configuration-in-drupal-8
- https://www.drupal.org/docs/8/api/configuration-api/working-with-configuration-forms
I’ve also studied every “how-to” I could find:
- http://befused.com/drupal/menu-links-custom-module-d8
- https://www.thirdandgrove.com/creating-a-simple-configuration-form-Drupal-8
- http://valuebound.com/resources/blog/step-by-step-method-to-create-a-custom-form-in-drupal-8
Still no menu in the admin UI. What am I doing wrong?