Hot answers tagged

1

This is not possible in core Magento 2, the container node only supports these attributes: name label before after as output htmlTag htmlId htmlClass You would need to load a template inside that container and add your attribute there.


1

*Make sure your layout file is correct way, otherwise not works! Please try below code <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <head> <!-- Here I have tried both methods but no one ...


Only top voted, non community-wiki answers of a minimum length are eligible