Use data from one content part in the view of another content part

Topics: Customizing Orchard
Nov 3, 2014 at 3:11 PM
Edited Nov 3, 2014 at 3:11 PM
I'm trying to edit the Tekno.FlexSlider module from the gallery to be able to select some of the options for each individual slider instead of making all sliders have the same settings. I got the FlexSliderGroupPart working so the user can select some options such as animation speed but I don't know how to get this data into the view of the FlexSliderWidgetPart where I can use javascript to set these settings. I also need to include the WidgetPart name used for css into the view so I can specify which slider is to be changed. Any ideas would be greatly appreciated. Thank you.
Nov 3, 2014 at 3:46 PM
I am a little bit confused about the title. Normally you add some properties to your Part, in your case to the FlexSliderGroupPart and these Properties are accessible in the view of the FlexSliderGroupPart - so you can use it for adding settings to your javascript or defining css classes?! So I think there shouldn't be a content part in an contentpart or am I wrong?
Nov 3, 2014 at 4:53 PM
The FlexSlider is composed of three content parts: FlexSliderPart, FlexSliderGroupPart, and FlexSliderWidgetPart. Currently the FlexSliderWidgetPart's driver will grab all of the slides (FlexSliderPart) for its specified group (FlexSliderGroupPart) and pass them into the view. I need to also pass the extra data from my altered FlexSliderGroupPart to this view, but can't figure out how. Basically I just need a way to access the viewModel for the FlexSliderGroupPart from within the FlexSliderWidgetPart's view.