Currently working on a magento homepage layout that includes a static block widget through the CMS (as opposed to referencing it through XML layouts) but no matter what I do I can't alter the classes generated when rendering.
The widget currently renders the following tag
<div class="widget block block-static-block"> </div>
I have tried adding it through the htmlClass
argument through a referenceblock to the widget ID in layout XML but that's not working. Any other ideas?
Best Answer
Use argument of css_class You can call your block directly from the xml layout(Thats what i did at magento 1.x)
i Guess you can do it on phtml but thats not was approach for my opinion
this is from the official magento 2 docs
http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/xml-manage.html
Please read it before you asking and go directly for SE
Happy coding Mate