The Community Server Controls source library contains a WrappedContentBase class that can be extended for a variety of purposes, making it very easy to build context-aware controls to use in conjunction with other CS Chameleon List, Data and Form controls.
If you search “: WrappedContentBase” in the Community Server SDK you’ll find examples of controls derived from the class performing various functions. I’m going to demonstrate using a smart image link to display a custom email Modal Window. The final product looks like this.
WrappedContentBase-derived Chameleon controls are first cousins to other data-based controls, so I keep them with their immediate family of controls.
The HyperLinked image uses the <DBVT:POGroupData /> Chameleon control in current context as its datasource. There is a certain symmetry between these WrappedContentBase controls and WrappedFormBase-derived Chameleon Form controls. In the code excerpt below we see the role of the context datasource, a custom POGroup object, passing the object’s POID value to the Modal Window URL.
But what is possibly the most compelling feature of WrappedContentBase controls is how they can be so easily dropped on a page as shown below.