But it only shows you how to create a random variable in the controller. When I try to create a template for a custom node type in my module, it can't access the {{ content }} at all. How do I pass {{ content }} into the custom template?
But the "directory" variable seems to be set to the current theme directory rather than the module directory. So, instead, I have to link directly to the file like this:
I have a twig template with a custom layout for a specific content type. I would like the node preview to use the custom template. There does not seem to be a method for doing this. The template naming conventions do not address preview modes, and none of the file name suggestions in the twig debugging info address my particular content type. Is there a method for doing this?