KPNOnline
10 years agoMentor
Pass object or array between 2 custom components
I have a custom component, a 'controller'.. Thats manages some data for an interactive header.
This component does not render, but only passes the data to a 'child' component (view), and the view will render whatever he gets from the controller.
But how can I pass the data from the 'parent' view to the childview..
In my parentView I set my data and call my 'sub' view like this:
<#assign slides=[1,2,3,4,5,6,7] />
<@component id="sybView" slides=slides />
But how can i get to that data in the subView????
This doesn't work:
${env.context.component.getParameter('slides')}