+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Copy Events Module

Copy Events Module

5 posts, 1 answered
  1. WebGeek
    WebGeek avatar
    186 posts
    Registered:
    20 Dec 2006
    01 Sep 2010
    Link to this post
    Is it possible to COPY the Events Module and create a new Events Module that will work side by side with the existing Events Module?

    I would like for Events Module #1 to be used by one division and Events Module #2 to be used by another. 

    What would I need to change so that Division #1 only sees their categories in the drop down and Division #2 only sees theirs?  
     
    If this is possible, can you guide me in the right direction on how to do it?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    01 Sep 2010
    Link to this post
    Hello medicalwebgeek,

    You can create additional provider as described in this post. This is the easiest way to do this. Another option is inheriting from EventsView module class and implementing the views through a custom ControlPanel as show in our sample module - Products

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. WebGeek
    WebGeek avatar
    186 posts
    Registered:
    20 Dec 2006
    02 Sep 2010
    Link to this post
    Thanks for the link to the blog post/webinar - it was great. 

    For some reason my custom template mapping does not work for my scheduler view below.  I was already using the custom mapping for some of the events admin controls.  When I tried to add my new module mappings, I got a "Key already in use error", I figured I could just add a key to each like I have below. When I click on Add New Item uder Scheduler, it pulls up the other add event module with all of the items even though I have hidden a few of the controls on add new. What am I doing wrong? 

    <viewSettings hostType="Telerik.Events.WebControls.Admin.EventsItemsList">
         <additionalTemplates>
           <add key="Events"  layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/Events/EventsItemsList.ascx" />
           <add key="Scheduler" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/Scheduler/SchedulerItemsList.ascx" />
         </additionalTemplates>
       </viewSettings>
       <!--Inserts an event item-->
       <viewSettings hostType="Telerik.Events.WebControls.Admin.EventsItemNew">
         <additionalTemplates>
           <add key="Events" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/Events/EventsItemNew.ascx" />
           <add key="Scheduler" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/Scheduler/SchedulerItemNew.ascx" />
         </additionalTemplates>
       </viewSettings>
       <!--Edits an event item-->
       <viewSettings hostType="Telerik.Events.WebControls.Admin.EventsItemEdit">
         <additionalTemplates>
           <add key="Events" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/Events/EventsItemEdit.ascx" />
           <add key="Scheduler" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/Scheduler/SchedulerItemEdit.ascx" />
         </additionalTemplates>
       </viewSettings>
       <!--Displays a preview of an event item-->
       <viewSettings hostType="Telerik.Events.WebControls.Admin.EventsItemPreview">
         <additionalTemplates>
           <add key="Scheduler" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/Scheduler/SchedulerItemPreview.ascx" />
         </additionalTemplates>
       </viewSettings>
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    02 Sep 2010
    Link to this post
    Hi medicalwebgeek,

    An item with the same key has already been added. means that you have duplicate values in ControlsConfig.

    The mapping below is correct and after restarting the application you should see the correct template

    <viewSettings hostType="Telerik.Events.WebControls.Admin.EventsItemsList">
      <additionalTemplates>
        <add key="Events"  layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/Events/EventsItemsList.ascx" />
        <add key="Scheduler" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/Scheduler/SchedulerItemsList.ascx" />
      </additionalTemplates>
    </viewSettings>

    Make sure that you have restarted the application and any key name is not misspelled.

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Answered
  5. WebGeek
    WebGeek avatar
    186 posts
    Registered:
    20 Dec 2006
    02 Sep 2010
    Link to this post
    Thanks
Register for webinar
5 posts, 1 answered