Using Default Magento 2 Template Block Class in a Module

magento-2.1xml

I'm tying to add a simple block to the header using the default template class with the following code

<block class="Magento\Framework\View\Element\Template" name="test.trigger" template="trigger.phtml"/>

This is inside a container next to a custom class block I wrote so i know the containers and everything else all works. If I change the class to the same as my custom class it works.

So i can use my modules custom class and it will render out fine, how can i use the default template class without needing to extend it pointlessly in my module?

Best Answer

Try following way:

<block class="Magento\Framework\View\Element\Template" name="test.trigger" template="Vendor_Module::trigger.phtml"/>