문제

I'm trying to adapt the Luma Theme for my needs and move some elements in layout. I add a default.xml file in my Child Theme and add those lines :

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
      <move element="minicart" destination="header.container" before="-" />
      <referenceBlock name="top.search" remove="true"/>
    </body>
</page>

The minicart is now on the header container but is there a directive to apply these changes only for Desktop and not for Mobile view ?

도움이 되었습니까?

해결책

XML layout files do not care about platform or screen size. You'll have to use CSS and JS to get the style you're going for.

Documentation about moving elements with JS

The responsive.js script implements specific responsive functions for the Blank and Luma themes.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top