[SOLVED] Neos.media:image data-attribute should not change to lowercase

Hey
Is there a way to prepend neos.media:image ViewHelper to transform attribute-Names within data-property in lowercase?

I use in fluid-template:

<media:image image="{image}" class="{stringImgClass}" alt="{alternativeText}" title="{imgTitle}" width="{width}" maximumWidth="{maximumWidth}" height="{height}" maximumHeight="{maximumHeight}" allowUpScaling="{allowUpScaling}" additionalAttributes="{additionalAttributes}" data="{dataArray}" />`

Normally all works fine in different nodeTypes.
But now I have to supply a jquery-plugin within is required some data-attributes like:

... data-actionRenderingBefore="1" data-cacheImages ="0"  />

Before the ViewHelper the ArrayKeys in {dataArray} are lowerCamelCased like they should for Plugin. After Neos-ViewHelper rendering, the Attributes-Name are lowercased:

... data-actionrenderingbefore="1" data-cacheimages ="0"  />

With lowercase, the Plugin is overlooked the data-attributes …

Sorry – can’t find a solution: neither in readthedocs nor in NeosSourceCode for ViewHelper.

  • How I get unchanged/not-lowercased Attribute-Names?

https://www.w3.org/TR/html5/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes

tl;dr; (data) attributes are lower case only. And even jQuery sticks to it from all I know. I guess what you actually need is data-cache-images which sometimes in jQuery can be accessed as data('cacheImages').

And are you sure you checked the output in source view? Any decent browser dev tool will give you all attributes lowercased as that is what is spec and what the browser sees, but if I check source I see fooBar in my test.

@christianm: Twin bull’s-eye … you are absolutely right!
To much tinkered :blush: Thank you!