Create a route to show a node with a custom display/view mode In Drupal 8, it is easy to add display/view modes. Let say I created the tech display mode and I set it up for the film content type.

Now, I would like to create a route for it and access it as local task of entity.node.canonical.

How can I achieve this?
In Drupal 8 there are two display modes: view mode and form mode.

You can define the view mode in a route using the _entity_view key.


  _entity_view: The value is entity_type.view_mode. Will find an entity in the path and render it in the given view mode. E.g. _entity_view:
  node.teaser will return the render array of the {node} in teaser mode.