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

Forums / Developing with Sitefinity / Using ControlTemplates

Using ControlTemplates

3 posts, 0 answered
  1. Luc Baeten
    Luc Baeten avatar
    169 posts
    Registered:
    23 Sep 2005
    29 Jul 2009
    Link to this post
    Hello

    For Images I defined 3 extra metafields. To edit these metafields I created the Telerik.Sitefinity.Configuration.ControlsConfig.xml and defined the following:

    <?xml version="1.0" encoding="utf-8"?>  
    <controlsConfig> 
      <viewMap> 
          <!--Edit library item properties in batches - Images & Documents.--> 
          <viewSettings hostType="Telerik.Libraries.WebControls.Admin.LibraryItemBatchEdit`1[[Telerik.Libraries.WebControls.Admin.LibraryItemsView, Telerik.Libraries]]" layoutTemplatePath="~/ControlTemplates/Admin/Libraries/LibraryItemBatchEdit.ascx" /> 
          <!--Edit library item properties - Images & Documents.--> 
          <viewSettings hostType="Telerik.Libraries.WebControls.Admin.LibraryItemEdit" layoutTemplatePath="~/ControlTemplates/Admin/Libraries/LibraryItemEdit.ascx" /> 
      </viewMap> 
    </controlsConfig> 

    To work with my own control templates it was neccessary:
    - to copy the LibraryItemEdit.ascx in the Sitefinity\Admin\ControlTemplates\Libraries directory otherwise an error occurred
    - to add cancelButton1 and cancelButton2 as LinkButtons in LibraryItemBatchEdit.ascx. Otherwise the error below occured:

    A required control was not found in the template for "~/ControlTemplates/Admin/Libraries/LibraryItemBatchEdit.ascx". The control must be assignable form type "System.Web.UI.WebControls.IButtonControl" and must have ID "cancelButton1".



    By making these chjanges I was able to work with my own templates.

    Kind regards
    Luc Baeten


  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    29 Jul 2009
    Link to this post
    Hello Luc Baeten,

    Let us know if you need further assistance.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Luc Baeten
    Luc Baeten avatar
    169 posts
    Registered:
    23 Sep 2005
    29 Jul 2009
    Link to this post
    Hello Ivan

    Thank you for the quick response.
    I only wanted to let you know that it was neccessary to make these changes to work with custom control templates.

    So I need no further assistance for the moment

    regards
    Luc Baeten
Register for webinar
3 posts, 0 answered