Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot extend data layer to include a generic asset info for non-image #2883

Open
HitmanInWis opened this issue Oct 9, 2024 · 0 comments
Open

Comments

@HitmanInWis
Copy link

If extending the Download component, it doesnt seem possible to effectively add the asset data for the linked file into the data layer.

There is a AssetDataBuilder in WCM Core, but it is only ever used from the ImageComponentDataBuilder. This requires the data layer to be rendered .asImageComponent() labeling the asset as "image" in the data layer output.

I considered making a new AssetComponentDataBuilder in my project, but to appropriately hook into and reuse the WCM Core data layer supplier capabilities I'd need to reference internal classes like com.adobe.cq.wcm.core.components.internal.models.v1.datalayer.builder.DataLayerSupplierImpl

That said, maybe I'm looking at the issue incorrectly - admittedly the data layer builder framework in WCM Core is very confusing to me - it seems extremely abstract with a lot of loose coupling that would appear to be in support of extension by client code, but then some of the most critical classes are buried in internal packages preventing them from being used in client extensions. The data layer works well enough for anything already supported in the WCM Core data layer implementation, it just seems very hard to expand upon it in a client project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant