More in this section

Forums / Developing with Sitefinity / Intrasite module with different control panels

Intrasite module with different control panels

2 posts, 0 answered
  1. Kwinten Volckaert
    Kwinten Volckaert avatar
    41 posts
    01 Mar 2005
    30 Apr 2008
    Link to this post
    I followed the intrasite module example posted on the blogs. I have however a questoin. Can the control panel be seperated into 3 ascx files (ControlPanelList, ControlPanelInsert and ControlPanelEdit) like the other modules of sitefinity. How can I achieve this? Should this be done in the module.cs file?
  2. Ivan
    Ivan avatar
    478 posts
    16 Jun 2015
    01 May 2008
    Link to this post
    Hello Kwinten Volckaert,

    the pattern you've noticed on the other modules is a pattern we generally use for pluggable modules. There we have only one control (Control Panel), which however loads different templates (ControlPanelList, ControlPanelEdit, ControlPanel Insert...) depending on users actions.

    So essentially, regardless of what kind of module you are building, you will always have one control for ControlPanel. If you are dealing with a very complex UI and you don't want to manage all that inside of one user control, you can implement ControlPanel user control with only MultiView control and for each of the modes you can implement another user control. The specific mode user controls you would put inside of different Views of a MultiView. In this way you would mimic the pluggable-module patter we use.

    By doing this, you would however need to expose some events on the user controls that would represent the insert/edit/list... modes. So for example, ControlPanelInsert user control would expose event OnInserted, and the ControlPanel user control would subscribe to this event. Every time this event would be fired, ControlPanel user control would know that it should switch the index of MultiView control to the View which has ControlPanelList control.

    I hope this makes sense. Let me know if you have any additional questions.

    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
2 posts, 0 answered