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

Forums / Developing with Sitefinity / Duplicate and rename the News Module

Duplicate and rename the News Module

6 posts, 0 answered
  1. Eric Wallace
    Eric Wallace avatar
    66 posts
    Registered:
    08 Oct 2009
    26 Apr 2010
    Link to this post
    Like the title says, I'm wanting to duplicate the news module and rename it to something else. Is this possible without creating another pluggable module?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    26 Apr 2010
    Link to this post
    Hello Eric Wallace,

    Create a custom class that inherits from NewsModule class, override Name and Title properties. You could put the code in App_Code and Sitefinity will pick it up automatically. This is the only way to get the same module with different title. Another option would be to use the same module - News, but change the text that the RadTabStrip control displays. This will not require to override the module, but there will be other references left ( for instance - the breadcrumb when you select content items or you are moving between the views)

    All the best,
    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. LouiseBA
    LouiseBA avatar
    61 posts
    Registered:
    23 Mar 2010
    27 Apr 2010
    Link to this post
    Hello, I am wanting to do similar but amend the existing news module, the tags section to do my own behavior. So everything else exactly the same, but overwrite the tags section with my own, presumably user control. Please advise I have already posted a question on this and got no response. So advise on either modifying that part of the current news module, or creating my own news module inheriting all the same behavior and overriding the tags part.

    thanks, louise.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    27 Apr 2010
    Link to this post
    Hi LouiseBA,

    You can inherit from News module but basically to replace ItemNew and ItemEdit views - Replacing child views where you need to implement your custom logic. You also have to replace TagsView from the CommandPanel or override is logic.  In this case you will be able to use Permissions, Categories and Comments as they come out of the box.

    Another option - custom module with custom views - you should implement all custom views and inherit the base

    • Telerik.Cms.Engine.WebControls.Admin.PermissionsView
    • Telerik.Cms.Engine.WebControls.Admin.CategoriesView
    • Telerik.Cms.Engine.WebControls.Admin.CommentsView

    Greetings,
    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.
  5. LouiseBA
    LouiseBA avatar
    61 posts
    Registered:
    23 Mar 2010
    28 Apr 2010
    Link to this post
    Hello Ivan,

    I really appreciate your help but that link takes me to a document that tells you how to override the save content method. its way too simplified for what I need. Is there any sample code you could refer me to to override the bit that overrides the creation of the tags section on the news edit (or news add)..to use my own control and not the in built one. I'm not quite sure where to start..

    Thanks a lot, Louise.
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    28 Apr 2010
    Link to this post
    Hi LouiseBA,

    The built-in Tags control is required, which means you cannot remove it or replace it easily. You could just hide it from the template. You need to create a custom classes that inherits from ContentItemEdit and ContentItemNew. There override SetContentForm and after calling the base you need to implement the logic for your custom tags control. then override SaveContent() and after calling the base implement your logic for persisting the tags.

    Best wishes,
    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.
Register for webinar
6 posts, 0 answered