-
Bug
-
Resolution: Unresolved
-
Neutral
-
None
-
6.2.30
-
None
Context attributes are not passed to component variants.
Consider an area which uses a custom template script:
areas: main: templateScript: /travel-demo/templates/pages/mainArea.ftl
In the script we pass contextAttributes to the component:
[#list components as component ] [@cms.component contextAttributes={"indexString":indexString, "useIndex":useIndex}/] [/#list]
When trying to access the context attributes in the component script they are lost when component variants are in place.
${ctx.indexString} ${ctx.useIndex}
Reproduce
- Create an area script which passes attributes.
- Configure the templateScript in the page template definition.
- Create a page with two components.
- Add a component variant to one of the components.
Actual
The component with variants cannot access the passed contextAttributes. The regular (non-variant) component can.
Expected
The contextAttributes should be accessible in the component variant.
Acceptance criteria