I want to override the summary.phtml template (vendor/magento/module-review/view/frontend/templates/helper/summary.phtml)
with a custom module.
The template is overridden in the catalog_product_view.xml
layout file with this code:
<referenceContainer name="content">
<referenceBlock name="product.info.review" template="Vendor_Catalog::review/helper/summary.phtml"/>
</referenceContainer>
My template is well displayed but the data of the block is not accessible. I cannot use the default block methods (getReviewsUrl, etc).
I have tested this method but my custom template is not loaded:
<?xml version="1.0"?>
<page layout="1column" 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.review" >
<arguments>
<argument name="template" xsi:type="string">Vendor_Catalog::review/helper/summary.phtml</argument>
</arguments>
</referenceBlock>
</body>
</page>
Do I have to override the block? Is there another way?