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

Forums / Developing with Sitefinity / Custom IContentTagEditor control

Custom IContentTagEditor control

2 posts, 0 answered
  1. Bobby
    Bobby avatar
    56 posts
    Registered:
    11 Feb 2009
    03 Jun 2010
    Link to this post

    I am implementing my own IContentTagEditor control. From reading your docs the two requirements for doing this is that the custom control have an id of tagsControl and it implement the IContentTagEditor interface. I have done this and sitefinity correctly passes the provider name and the contentId to my custom control. I am using this to load the tags in a RadComboBox which is located on my custom control template page. My tags load in the combo box fine. So, it seems like I have followed the two guidelines specified by your documentation. However, when I try to get the control by overriding SaveContent from my ContentItemEdit<T> page, , it gives me the  following error,

    A required control was not found in the template for "Medpac.module.document.Resources.ControlTemplates.Backend.MedpacDocEditView.ascx". The control must be assignable form type "Medpac.module.document.WebControls.Admin.DocumentType" and must have ID "tagsControl"

    I am not sure why this would be the error since sitefinity passed my custom control the correct provider name and content id and I loaded the tags correctly when the custom control was intializing. Do you have any ideas? Any help would be appreciated.

    Thanks,
    Bobby

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    04 Jun 2010
    Link to this post
    Hi Bobby,

    When you inherits from ContentItemEdit there are required controls that you need to have in your derivate. The error is thrown, because in the template of your view there is no control of type IContentTagEditor that has ID="tagsControl" or this control is inside the template, but the control cannot be found. In the default templates, this control is ContentTagEditor. Also, make sure that your custom control that implements IContentTagEditor has ID="tagsControl"

    <li class="tags">
         <sf:ContentTagEditor ID="tagsControl" runat="server" />
    </li>


    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.
2 posts, 0 answered