New answers tagged

0

In my case, I'm also using a RouteSubscriber to change the default controller responsible for handling taxonomy term entities. I also wanted to use a custom template only for a specific taxonomy (called my_taxonomy in the example below). Here is the code for the RouteSubscriber: <?php namespace Drupal\my_module\Routing; use Drupal\Core\Routing\...


1

If you look at the content of the user.routing.yml file, you will notice there are more than 15 routes defined in that file. What is wrong in your code is that the fifteenth and the sixteenth routes have the same identifier, unicef42.accueil_controller_index. unicef42.accueil_controller_index: path: '/accueil' defaults: _controller: '\Drupal\unicef42\...


0

As long as a default value isn't provided in the route definition, every route placeholder is required. Defining the route as follow is sufficient. my.search.results: path: '/search/{text}' defaults: _controller: '\Drupal\my\Controller\SearchController::results' _title: 'Search Results' requirements: _permission: 'access content See, for ...


Top 50 recent answers are included