2

Is there a way for me to remove the class name 'page-main' from the 'maincontent' div and add a new class name?

2

If you're interested, the answer is to use a referenceContainer in the XML file and add the new Class / ID names to the DIV / XML container.

For example:

<referenceContainer name="main.content" htmlTag="main" htmlId="add-ID-name-to-container" htmlClass="new-class-name"/>

The rendered DIV (main) will look like:

<main id="add-ID-name-to-container" class="new-class-name" >

    ...

</main>

The un-edited/updated version would look like:

<main id="maincontent" class="page-main" >

    ...

</main>
  • Which arguments should be used to replace the store_switcher's class ? There's a block for it, but I couldn't find any container. – DevonDahon Nov 3 '17 at 5:04
  • perfect answer made my day!!! +1 :) – SagarPPanchal Jun 21 at 5:26

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.