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?
1 Answer 1
Try following way:
<block class="Magento\Framework\View\Element\Template" name="test.trigger" template="Vendor_Module::trigger.phtml"/>
-
@Chris Morris did you try this answer?Sohel Rana– Sohel Rana2017年01月17日 06:54:02 +00:00Commented Jan 17, 2017 at 6:54
-
Only just got back onto the project, seem to have worked. Thanks.Chris Morris– Chris Morris2017年01月19日 16:48:04 +00:00Commented Jan 19, 2017 at 16:48