How to add or remove a class in the store-switcher div from default.xml ?

I tried this :

   <referenceBlock name="store_switcher">
            <argument name="block_id" xsi:type="string">switcher-store</argument>
            <argument name="css_class" xsi:type="string">my_new_class</argument>

And this :

<referenceContainer name="header-wrapper" htmlTag="div" htmlId="switcher-store" htmlClass="my_new_class"/>

(I moved the store_switcher block to the header-wrapper container)

But none works.

  • 2.2 removes the ability to do this... I'm not sure what the solution is now though – Sam Holguin Jan 7 '18 at 15:42
  • any news about that ? – Pol Ravalitera Feb 2 '18 at 16:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.