Hi,
Brief explanation of a hack we use:
- DNN looks at server controls directly under the skin control to find available panes
- Those controls must be of one of these types: td, div, span, p
- DNN will not look for panes in nested server controls, such as controls inside a skin object
However... (this works in DNN 4.9, not tested in DNN 5):
- You can dynamically register Panes with the ActiveTab.Panes collection to add panes that are defined in nested server controls
- The pane control must be of a supported type (td, div, span, p) with the runat="server" attribute
- When you register the dynamic pane, you must use the UniqueID of the dynamic pane control, relative to the skin object:
string relativeUniqueId = MyNestedPaneControl.UniqueID.Substring(MySkin.UniqueID.Length + 1);
PortalSettings.ActiveTab.Panes.Add(relativeUniqueId);
- You will then be able to add modules to this pane using standard functions, such as the 'add module' from the control panel
Limitations:
- the pane name will look somewhat ugly in the panes dropdown list at the top (the pane name will be the relative unique ID, such as MyContainer$MyPane)
- layout mode will not show this dynamic pane (but view and edit will work fine)
- this may break in future versions of DNN (not tested in DNN 5 as mentionned)
Ideally...
- DNN should provide a mecanism to create dynamic panes...
- That would enable to create more usable "presenter" controls, such as tab presenter, accordion presenter, where we could add modules to dynamically created panes
I hope this hack can help you out...
Etienne