Skip to main content

Questions tagged [routes]

Using a term introduced in Drupal 8, routes are the paths to which modules respond.

1 vote
1 answer
80 views

I'm trying to pass a URL to my custom form and check it against any route that exists within the site so that I can perform actions on it based upon my own arbitrary criteria I've checked against the ...
Andrew Morris's user avatar
0 votes
2 answers
124 views

I have a route defined in module.routing.yml, and I want to add a UI in the module to let the user configure what types of access to allow: Oauth2 JWT Cookie How do I do that, since routing.yml is a ...
Patrick Kenny's user avatar
0 votes
1 answer
52 views

My {custom_module}.routing.yml file code is as below: custom_greeting.greeting: path: '/custom-greeting/{name}' defaults: _controller: '\Drupal\custom_greeting\Controller\...
Sudhan's user avatar
  • 1
1 vote
1 answer
424 views

Ok, I've tested this against drupal/recommended-project:^8, ^9 and ^10. Nothing else installed. I want anon users to be able to hit /user/logout. That's the requirement. IMO, this code (or a close ...
James's user avatar
  • 13
0 votes
1 answer
149 views

I created a custom entity type using drush generate entity:content. I chose to have bundles, and I added a bundle test_bundle. I can add my custom entities at admin/content as expected. However, when ...
Patrick Kenny's user avatar
0 votes
1 answer
124 views

My module has several pages which use a custom access callback. The conditions for access may change from call to call so this needs to be checked every time. When I am logged in, the access ...
Kevin Finkenbinder's user avatar
0 votes
1 answer
191 views

In my D10 application, it is required that I have a parallel user login system separate from the Drupal system (it is a requirement I cannot change). On my routing, I have the following: ...
Kevin Finkenbinder's user avatar
0 votes
0 answers
34 views

I'm trying to embed Discourse comments in Drupal, so I'm tryinig tu use this code snippet in a custom block : <div id='discourse-comments'></div> <meta name='discourse-username' content=...
Vanessa Lambert's user avatar
1 vote
1 answer
177 views

I created a page by a module and the cache of that page must be deleted if a node of node-type 'foo' is updated. How do I do that? I read https://www.drupal.org/docs/drupal-apis/cache-api/cache-tags ...
tis's user avatar
  • 75
0 votes
1 answer
65 views

I have Multi-site setup , want to make available custom page say '/speakers' on domain1 site but not on domain2 site I have tried to figured out in routing.yml file to check is there way to pass any ...
mini_poojasharma's user avatar
-1 votes
1 answer
262 views

I have a custom module that i'd like to display my webform on a certain page but it keeps sending me to a 'Page not found'. folder structure is; modules/custom/custom_webform_display -...
bennyc's user avatar
  • 19
0 votes
0 answers
268 views

I have a route which need to have the language code as optional parameter: my_module.my_route: path: '/custom-link/{langcode}' defaults: _controller: '\Drupal\my_module\Controller\MyController:...
Giuseppe's user avatar
  • 1,148
0 votes
2 answers
248 views

I'm working on fixing a custom module that returns XML from a certain route. Essentially what is described in the answers of this question. Currently this route isn't being cached. I've tried to ...
Vecta's user avatar
  • 633
0 votes
2 answers
154 views

I'm trying to convert block forms (the content entity forms) into Gin Admin theme forms. Gin theme provides a hook for this: function hook_gin_content_form_routes(): array { return [ 'entity....
Hudri's user avatar
  • 5,392
1 vote
2 answers
121 views

Suppose I have a route for a local task like this: MODULE_NAME.node_options: path: '/node/{node}/options' defaults: _form: '\Drupal\MODULE_NAME\Form\NodeOptionsForm' _title: 'Options' ...
Anders's user avatar
  • 145

15 30 50 per page
1
2 3 4 5
154