Hey,
I downloaded MageFan Awesome Blog plugin for Magento 2.2 and I want to override a template file.
I've added my own plugin to try and do this:
app/code/Company/BlogOverride
I have this file tree:
|-etc
|-----module.xml
|-registration.php
|-view
|-----frontend
|---------layout
|-------------catalog_product_view.xml
|---------templates
|-------------catalog
|-----------------product
|---------------------relatedposts.phtml
the contents of my catalog_product_view.xml file:
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance dc" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<referenceBlock name="content.aside">
<action method="setTemplate">
<argument name="template" xsi:type="string">Company_BlogOverride::catalog/product/relatedposts.phtml</argument>
</action>
</referenceBlock>
</page>
I then run:
$ php bin/magento setup:upgrade
$ php bin/magento setup:di:compile
$ php bin/magento setup:static-content:deploy -f
$ php bin/magento cache:flush
but it still uses the default plugin template. How do I override it? I've raised an issue on Magento SE too: https://magento.stackexchange.com/questions/250857/how-do-i-override-plugin-phtml-file-added-by-xml
Thanks