Skip to main content

Magento 2: Update the CSS class name of #maincontent

For example:

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

 

 OUTPUT:

The rendered DIV (main) will look like:

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

    ...

</main>

Comments

Popular posts from this blog

Magento 2: Category list for custom magento system configuration section ( Backend )

In system.xml file field for multi select of category is like: NOTE: Use Select for Single item and multiselect for multiple in - <field id = "bannerlist" translate = "label" type = " multiselect " <group id = "bannerblock_setting" translate = "label" type = "text" delault = "1" sortOrder = "3" showInDefault = "1" showInWebsite = "1" showInStore = "1" > <label> Setting </label> <field id = "bannerlist" translate = "label" type = "multiselect" sortOrder = "10" showInDefault = "1" showInWebsite = "1" showInStore = "1" > <label> Select Category </label> <!-- <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>--> <source_model> Ipragmatech\Bannerblock\Model\Config\Source\C...

script to change single product add to cart text

  add this in addtocart.phtml page <script>     require([         'jquery',         'mage/mage',         'Magento_Catalog/product/view/validation',         'Magento_Catalog/js/catalog-add-to-cart'     ], function ($) {         'use strict';         $('#product_addtocart_form').mage('validation', {             radioCheckboxClosest: '.nested',             submitHandler: function (form) {                 var widget = $(form).catalogAddToCart({                     bindS...