Can I use my own template for a view mode? I'm creating a cusom module that loads a node  through a view_builder. However, none of the available view_mode display the elements like I'd like them to be, so I'm about to create my own view mode. However, I have parsed quite a few tutorials about view_builders, but none talked about using a custom template (or I missed it)

So, is it possible to use your own template, and how do you do so?

Thank you in advance
The standard way to do this is to create a template in your theme, you can use node--nodetype--viewmode.html.twig . (two dashes between each part).

To use it in your custom module, you'd have to use hook_theme_registry_alter to change the path that it looks in for that theme hook.

function mymodule_theme_registry_alter(&amp;$theme_registry) {
  $theme_registry['node__nodetype__viewmode']['path'] = drupal_get_path('module', 'mymodule') . '/templates/';
}


I don't really see the value of moving it into a custom module though.  It's a standard to keep custom templates in the theme.