magento / community-features

Magento Features Development is an Initiative to Allows Community Memebers Join to Development of Magento Features
46 stars 18 forks source link

[Improvement] Add HTML attributes to containers #85

Closed magento-engcom-team closed 3 years ago

magento-engcom-team commented 5 years ago

Hello,

This is not an issue but an improvement. It would be nice to add HTML attributes to containers to layout files.

For example, if I want to create the following HTML output with a container:

<header class="header" id="header" data-sticky data-isheader="true">

</header>

I can specify tag, id and class but not the other attributes.

What do you think about it?

Original Report: https://github.com/magento/magento2/issues/13354 by @VincentMarmiesse

maxxeh1 commented 5 years ago

When will this improvement be available? It is better to create HTML through XML containers but I currently have to use custom classes with javascript to apply html attributes to these. It would be amazing to be able to add HTML attributes to containers

joshdavenport commented 5 years ago

Yeah this would be fantastic. I once needed to add custom microdata to existing containers and could only do so by either parsing output the dirty way or adding custom behaviour to container rendering. The custom behaviour needed custom XML which is invalid due to XSD validation. This kind of thing is a perfect use case for this feature.

thomas-kl1 commented 5 years ago

See state of PR magento/magento2/pull/13355

sivaschenko commented 3 years ago

Please see the discussion in https://github.com/magento/magento2/pull/13355