Issue
Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: 'TT::calculator.phtml' in module: 'Magento_Catalog' block's name: 'calculator.tab'
Layout Location:
app/code/TT/Calculator/view/frontend/layout/catalog_product_view.xml
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="product.info.details">
<block class="Magento\Catalog\Block\Product\View" name="calculator.tab" template="TT::calculator.phtml" group="detailed_info">
<arguments>
<argument translate="true" name="title" xsi:type="string">Calculator</argument>
</arguments>
</block>
</referenceBlock>
</body>
</page>
Template Location:
app/code/TT/Calculator/view/frontend/templates/calculator.phtml
Questions
- I've seen some solutions where the *.phtml file is saved in app/design but I'm trying to get this to work in app/code. What have I missed?
- Also, does this "extend" catalog_product_view.xml or replace it?