I've created a module called hotel_reviews
.
I've created the route node/{node}/reviews using hotel_reviews.routing.yml.
hotel_reviews.content:
path: '/node/{node}/reviews'
defaults:
_controller: '\Drupal\hotel_reviews\Controller\ReviewsController::content'
_title: 'Reviews'
requirements:
_permission: 'access content'
I then tried to add a local task using hotel_reviews.links.task.yml.
hotel_reviews.content:
route_name: hotel_reviews.content
title: 'Reviews'
base_route: node.view
weight: 100
I can now access the content defined by my controller at node/1/reviews
, however when I go to node/1
I don't see a reviews tab.
What am I doing wrong?
I've been using the following documentation so far: