1

In product view xml , i found that

<referenceContainer name="content.aside">
            <block class="Magento\Catalog\Block\Product\ProductList\Related" name="catalog.product.related" template="Magento_Catalog::product/list/items.phtml">
                <arguments>
                    <argument name="type" xsi:type="string">related</argument>
                </arguments>
            </block>
            <block class="Magento\Catalog\Block\Product\ProductList\Upsell" name="product.info.upsell" template="Magento_Catalog::product/list/items.phtml">
                <arguments>
                    <argument name="type" xsi:type="string">upsell</argument>
                </arguments>
            </block>
            <block class="Magento\Catalog\Block\Product\View\Additional" name="product.info.additional" as="product_additional_data"/>
        </referenceContainer>

How is the html called from template?

1

1 Answer 1

3

Html file is called from Catalog module.

magento2.1/vendor/magento/module-catalog/view/frontend/templates/product/list/items.phtml

Related, Upsell and cross sell product display inside detail page are coming from here.

Here in top file, $type = $block->getType() getting value of related, upsell,crosssell and based on value dynamic content are loaded in specific block.

1
  • How can we get customtype products in items.phtml along with Related, Upsell and cross sell products Nov 3, 2016 at 9:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.