Hi, i'm working on a Mobile module for Orchard.
I have a DeviceGroup part that can be assigned themes based on device selection rules. Each DeviceGroupPart can have mobile adaptations assigned to it that can be enabled/disabled, so there are parts such as ThemeSwitcherAdaptation, DocTypeAdaptation, ImageResizerAdaptation
which contain their own settings.
What I would love to know, is what is the best way to tie all the adaptation parts to the DeviceGroupPart and have a generic way to get at the adaptations Enabled and Name data, as I don't want to make any assumptions of what adaptations are installed.
I assume the easiest way is just to do a,
cfg => cfg
But i'm not sure how to set if the adaptation is Enabled in a generic way.
If I was doing this normally I would start with inheritance and have something like,
WebAppAdaptation : MobileAdaptationPart
As a bit more context, I would like all adaptations to display in a table on the DeviceGroup page with a checkbox to set if enabled and the rest of the adaptation's settings next to it. Haven't even got to how i'm going to group all the adaptations together
on the page :)
What is the best way to do this in Orchard?