0

I want to change the position of the mini cart in my theme. i am able to change it using css but it disturbs the mobile view. So is there any way i can do it using xmlenter image description here

1
  • you can change it via layout files. Nov 15, 2017 at 3:06

2 Answers 2

2

Just you need to put the bellow code to your theme default.xml file

<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.panel" after="top.search" />
    --------------------

   </body>
</page>

This your file path

design/frontend/YourTheme/ThemeName/Magento_Theme/layout/default.xml

1

you can change in layout file and interchange the position by using tag:

<move element="minicart" destination="header.container" before="-" />

Please, refer official link for more clarity : http://devdocs.magento.com/guides/v2.1/frontend-dev-guide/layouts/layout-types.html

Your Answer

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

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