Reputation: 133
I am new to magento 2. I am stuck in product view page design. I need to change the design of my product detail page. Please help me.
Upvotes: 2
Views: 10823
Reputation: 2325
you can change product page design from the xml.
copy catalog_product_view.xml from vendor\magento\module-catalog\view\frontend\layout
to your theme.
1- if you want to change the layout like 1 column or 2 column then you w'll need to change by following way.
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
2- You can move block using move.
<move element="name.of.an.element" destination="name.of.destination.element" as="new_alias" after="name.of.element.after" before="name.of.element.before"/>
3- call any static block in magento2 by below code.
<?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('block_identifier')->toHtml();?>
Upvotes: 4