Magento – Magento 2 : Move “catalog.product.related” block in product view

layoutmagento-2.0.7magento2product-view

I'm modifying the layout of the product view.

I'm trying to move and edit the product related block "catalog.product.related".

In my catalog_product_view.xml I have :

 <referenceContainer name="content.aside">
            <block class="Taschert\Example\Block\Product\Test" after="-" name="taschert.list.test" template="Taschert_Example::product/test.phtml">
                <arguments>
                    <argument name="section" xsi:type="string">productpage</argument>
                    <argument name="position" xsi:type="number">1</argument>
                </arguments>
            </block>
            <referenceBlock name="catalog.product.related" after="taschert.list.test"
                            template="Taschert_Example::product/list/items.phtml">
                <arguments>
                    <argument name="type" xsi:type="string">related</argument>
                    <argument name="section" xsi:type="string">productpage</argument>
                    <argument name="position" xsi:type="number">1</argument>
                </arguments>
            </referenceBlock>
        </referenceContainer>

The block product related use my custom template but show before my first block. Did I miss something ?

I have tried just to move the block with no result.

<move element="catalog.product.related" destination="content.aside" after="taschert.list.test"/>

I've clear my cache.

Best Answer

<move element="catalog.product.related" destination="product.info.main" before="-" />

Just flush the cache