I want to move to the sidebar, only on the product view.

To achieve this I've created catalog_product_view.xml in Vendor/Name/Magento_Theme/layout/.

I've added the following line:

<move element="product.info.main" destination="sidebar.additional"/>

But now the product.info.main-block jumps BELOW the footer, which obviously isn't what I wanted to achieve.

My question now is: how can I achieve this?

  • Have you 1column page layout or 2 columns? – Rakesh Jesadiya Jul 4 '16 at 13:32
  • How can I check the template used for product pages? by default it should be page-2column-right, or am I wrong? – Max Jul 4 '16 at 13:33
  • Have you working for detail page or category listing page? – Rakesh Jesadiya Jul 4 '16 at 13:35
  • catalog_product_view.xml targets the product detail page. – Max Jul 4 '16 at 13:38
  • sidebar.additional is not called inside product view page – Rakesh Jesadiya Jul 4 '16 at 13:41

Couldn't answer with comment because i lack reputation points, but to change to 2 columns you need to change this line of your xml-layout file:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-right" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
| improve this answer | |

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.