I have created custom block. I want to show this block only in grouped product pages.

any one have idea the syntax for magento2?

1 Answer 1


You can use product type dependent layout updates catalog_product_view_type_{prodyct_type}.xml (catalog_product_view_type_ grouped.xml)

For example:

<?xml version="1.0"?>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/layout_generic.xsd">
 <referenceContainer name="content">
     <block class="..." />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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