I am new to Drupal 8. I am working on groups module and want to assign different themes to different groups.So i need route name of groups. how to find route name of groups. Thanks in advance.

   * {@inheritdoc}
  public function applies(RouteMatchInterface $route_match) {
    // Use this theme on a certain route.
    return $route_match->getRouteName() == 'i need route name of groups here';


1 Answer 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 variable _route. You find also the route parameters you might need to further narrow down the route.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.