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

Forums / General Discussions / Batch Edit - Images and Document Module Category

Batch Edit - Images and Document Module Category

20 posts, 0 answered
  1. Eric
    Eric avatar
    40 posts
    Registered:
    10 Apr 2009
    06 Jul 2009
    Link to this post
    How do I enable the category batch edit feature in Sitefinity 3.6.  In the Image and Document module we have the batch edit for tags but not categories.  The online tutorial shows that category should be available. 
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    06 Jul 2009
    Link to this post
    Hello Eric,

    Please map the following external template LibraryItemBatchEdit.ascx and enable the categories drop down as the example below illustrates.

    <fieldset class="set"
                <div class="setIn batchtags">                
                    <asp:Label runat="server" AssociatedControlID="commonCategories" Text="<%$Resources:Category %>"></asp:Label> 
                    <sf:CategoriesField ID="commonCategories" runat="server" /> 
                    <sf:ContentTagEditor ID="commonTags" runat="server" /> 
                </div> 
            </fieldset> 

    I hope this helps.

    All the best,
    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. Eric
    Eric avatar
    40 posts
    Registered:
    10 Apr 2009
    07 Jul 2009
    Link to this post
    I do not have a LibraryItemBatchEdit.ascx file.  We are running Sitefinity Standard 3.6 with sp1.
  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    07 Jul 2009
    Link to this post
    Hi Eric,

    You will have to download the ExternalTemplates.zip. Since version 3.6 the control templates have been embedded, that means that if you want to edit a template, you will have to create an external one and after editing it you will have to map it. For more information, please take a look at Mapping a control to use external template.

    To download the ExternalTemplates.zip, please go to the downloads section of www.sitefinity.com, click the Older Versions link, and choose the version that you are using. From there choose the external templates zip file (see attached image).

    Sincerely yours,
    Rado
    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.
  5. Eric
    Eric avatar
    40 posts
    Registered:
    10 Apr 2009
    07 Jul 2009
    Link to this post
    We have 3.6 standard but dont see the external templates available for Standard.  It is available for community.  Does this make a difference if we use the community .ascx edition? 
  6. Eric
    Eric avatar
    40 posts
    Registered:
    10 Apr 2009
    07 Jul 2009
    Link to this post
    The community edition worked fine with standard sitefinity.  What was the reason for removing this feature?
  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    07 Jul 2009
    Link to this post
    Hello Eric,

    If you use plain 3.6, I suggest upgrade to SP2. The feature was commented in the code due to some feedbacks we received and we decided to hide it temporarily.

    Greetings,
    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.
  8. Adam
    Adam avatar
    33 posts
    Registered:
    23 Feb 2009
    16 Nov 2009
    Link to this post
    Hi Ivan,

    I mapped the template to the class:

      <viewSettings hostType="Telerik.Libraries.WebControls.Admin.LibraryItemBatchEdit" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/Libraries/LibraryItemBatchEdit.ascx" />

    But, Sitefinity throws this error:

    Could not find a type for a name.  The type name was 'Telerik.Libraries.WebControls.Admin.LibraryItemBatchEdit'.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.ArgumentException: Could not find a type for a name.  The type name was 'Telerik.Libraries.WebControls.Admin.LibraryItemBatchEdit'.

    Source Error:

    Line 54: 			{
    Line 55: 				Telerik.Web.IControlPanel ctrlPnl = (Telerik.Web.IControlPanel)this.contolPanel;
    Line 56: 				foreach (Telerik.Web.ICommandPanel cmdPnl in ctrlPnl.CommandPanels)
    Line 57: 					this.ToolBoxHolder.Controls.Add((Control)cmdPnl);
    Line 58: 			}


    Any chance you could send us the right syntax for this mapping?

    Thanks!
  9. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    17 Nov 2009
    Link to this post
    Hi Adam,

    Here is the syntax you should use - Sitefinity 3.7 SP1.

    <viewSettings hostType="Telerik.Libraries.WebControls.Admin.LibraryItemBatchEdit`1[[Telerik.Libraries.WebControls.Admin.LibraryItemsView, Telerik.Libraries]]" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/Libraries/LibraryItemBatchEdit.ascx" />

    Generally in archive with external templates there is a sample configuration file with all host types.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  10. Adam
    Adam avatar
    33 posts
    Registered:
    23 Feb 2009
    17 Nov 2009
    Link to this post
    Excellent! It's working great! I'm really getting the hang of extending the modules. Glad I invested the time.
  11. Nigel
    Nigel avatar
    49 posts
    Registered:
    07 Jul 2008
    01 Mar 2010
    Link to this post
    Hi, I have implemented this, however where there are more than 25 items in the batch edit, it only seems to be applying the changes to the items on the current page. That is, if I am editing 63 items, 3 pages of 25 worth, the category is only being applied to 25 items.
  12. Nigel
    Nigel avatar
    49 posts
    Registered:
    07 Jul 2008
    01 Mar 2010
    Link to this post
    And just one other point. The Batch Edit link in the Image and Documents is a little 'pointless'/'miss leading'.

    If the user selects a number of items to 'Batch Edit', then clicks batch edit, ALL items from the library are being edited, instead of only the items that where selected.
  13. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    01 Mar 2010
    Link to this post
    Hello Nigel,

    There is no implementation for group operations when you use BatchEdit. You can achieve this functionality creating a web service where you pass the IDs of selected items. You need to get a collection of the IDs of the content items, ParentID and provider name.

    [WebMethod]     
    public void GroupBatchEdit(Guid[] contentIDs, Guid newParentID, string currentCulture, string providerName)
            {
                var manager = new ContentManager(providerName);
                if (!string.IsNullOrEmpty(currentCulture))
                {
                    Thread.CurrentThread.CurrentUICulture = new CultureInfo(Int32.Parse(currentCulture));
                }
                foreach (Guid id in contentIDs)
                {
                    manager.GetPermission(id, CrudRights.Modify).Demand();
                    IContent contentItem = manager.GetContent(id);
                    contentItem.ParentID = newParentID;
     
                    // add other logic for managing items
                    manager.SaveContent(contentItem);
                }
            }

    You may find this blog post useful - Use the Content Manager API in a Web Service

    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.
  14. Nigel
    Nigel avatar
    49 posts
    Registered:
    07 Jul 2008
    01 Mar 2010
    Link to this post
    Hi Ivan, thanks for your quick reply, I will have a look at that, and maybe throw in a feature request for something like this in future versions.

    There was a second post however, which I think you may have over looked.

    "Hi, I have implemented this, however where there are more than 25 items in the batch edit, it only seems to be applying the changes to the items on the current page. That is, if I am editing 63 items, 3 pages of 25 worth, the category is only being applied to 25 items."

    Is this a bug, or have I incorrectly implemented the mod?

    Thanks
    Nigel
  15. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    02 Mar 2010
    Link to this post
    Hi Nigel,

    The batch editor modify 25 items, because this is the number of the objects that are added to the repeater control. It does not make sense to apply any changes to items that are on your 4th page and you even do not see them. Also if you have 100 k items and you perform batch edit to all these items your server will do down or you will way 1 hour until the query ends. This is why you batch edit only updates the items on the current page, not all library items. You can

    1. Increase the number of the items shown in LibraryItemBatchEdit view by mapping LibraryItemBatchEdit external template and increase ItemsPerPage value of the Pager control.

    2. Override CreateChildControls of LibraryItemBatchEdit view and change the DataSource of ItemList repeater.

    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.
  16. Nigel
    Nigel avatar
    49 posts
    Registered:
    07 Jul 2008
    03 Mar 2010
    Link to this post
    Thanks Ivan, your answer is informative as ever. A suggestion though, given that the explanation that you gave makes perfect sense, can I suggest that the save changes button saves the changes, without taking you back to the listing page. If you are working on page 1 and click save, you then need to click on batch edit, page 2 and click save. Click batch edit, page 3, click save etc.

  17. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    03 Mar 2010
    Link to this post
    Hi Nigel,

    Thank you for your suggestion. We will consider this as a possible implementation for Sitefinity 4.0.

    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.
  18. plaidpony
    plaidpony avatar
    3 posts
    Registered:
    29 Jul 2007
    19 May 2010
    Link to this post
    The following is from my controlsconfig.xml file that I copied from the templates that I downloaded:

        <!--Edit library item properties in batches - Images & Documents.-->
        <viewSettings hostType="Telerik.Libraries.WebControls.Admin.LibraryItemBatchEdit`1[[Telerik.Libraries.WebControls.Admin.LibraryItemsView, Telerik.Libraries]]" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/Libraries/LibraryItemBatchEdit.ascx" />

    After making this change, I am getting the following error:

    Could not find a type for a name.  The type name was 'Telerik.Libraries.WebControls.Admin.LibraryItemBatchEdit'.

    Adam was also receiving this error; however, after he updated the controlsconfig.xml file, everything was fine for him.  My settings match the given by Ivan; however, I'm still getting the error.  What am I doing wrong?

  19. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    19 May 2010
    Link to this post
    Hello plaidpony,

    You have used wrong mapping and then the application has not been restarted or Telerik.Libraries.dll cannot be loaded, because it is not presented in your bin or it is not accessible. Note that when you work with ControlsConfig file System.Reflection is used.

    Kind 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.
  20. plaidpony
    plaidpony avatar
    3 posts
    Registered:
    29 Jul 2007
    19 May 2010
    Link to this post
    So, this morning it is working--I restarted the app pool and that seemed to take care of it.
Register for webinar
20 posts, 0 answered