Score:1

How should we configure Config link on custom module?

ru flag

enter image description here

I need to create Config link while enabling module. In routing file, I have mention the path name of config form, but its not directly show in the Configuration page. Below is my routing code.

dm_user_timezone.user_timezone_settings:
path: '/admin/config/usertimezone/usertimezoneconfig'
defaults:
 _form: '\Drupal\dm_user_timezone\Form\UserTimezoneSettingForm'
 _title: 'User timezone page configuration'
requirements:
 _permission: 'access administration pages'
options:
 _admin_route: TRUE 

My folder sructure looks like this. Need help what I missed here.

enter image description here

Score:3
id flag

Add configure: dm_user_timezone.user_timezone_settings to the dm_user_timezone.info.yml file. The configure option is documented on drupal.org.

latikas avatar
ru flag
Thank you for your help. It works. :) One more question here, How should I display my module link on Configuration (/admin/config) page like People->Account Settings?
leymannx avatar
ne flag
@latikas - Find a contrib module that does the same and then follow its sample.
apaderno avatar
us flag
@latikas That is a different question that should be asked as new question. Comments should be used when there is anything not clear in the given answer, not to ask unrelated questions.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.