New answers tagged

1

Maybe start with https://drupal.stackexchange.com/a/232783/15055, just implement the preprocess page title hook (without the code inside for now) in a custom module or a custom theme. Then install the Devel sub-module Kint. And put ksm(\Drupal::routeMatch()->getRouteName()); inside this hook. Note, in the hook name replace MYMODULE with your custom ...


1

Could someone tell me where to go and which static route to change? It's not a static route. Like other entity collection routes, it is built with the aid of the comment annotations above the Vocabulary entity class. VocabularyRouteProvider also comes into play, and it sets a _title_callback into TaxonomyController::vocabularyTitle for good measure. At ...


0

Well, actually according to Drupal official docs you can specify validation criteria on *.routing.yml level file. The only thing to do is to add another section/sections on requirements property. Here's the example of filtering parameter {name} to allow to use only lower and upper characters from [a-z] and [A-Z]: example.user path: '/example/{name}' ...


1

system.admin_config is the top-level page at /admin/config. Normally you would not put your configuration link there - you would instead put it into one of the blocks that appear on that page. For example, the "People" block would be user.admin_link, so if you want your config under "People" use user.admin_link as your parent. Or if you want to put your ...


1

There is probably a *.routing.yml in the group module where you can find the route name, but routes can also be defined dynamically. So better use a tool, for the command line Drupal Console or for UI the devel module: Install the devel module, visit the page you want to find out the route name for and click on "Current route info". The route name is in the ...


3

As it mentioned in @Hudri answer it's not possible to define _form and a _controller in the same route. I think the solution for your use case is to define only route for the controller and embed the form inside it, like the following: amu_404_redirect_import.admin: path: '/admin/config/amu_404_redirect_import/upload' defaults: _controller: '\...


3

As doc states defaults (required): Defines the default properties of a route. Provide one of the following to specify how the output is generated: _controller _form _entity_view _entity_list _entity_form _route you can't list a _form and a _controller in the same routing.yml entry, only one of those keys is allowed. Either append that ...


Top 50 recent answers are included