Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bear 40 posts 129 karma points
    Jun 23, 2013 @ 21:29
    Bear
    0

    Moving a node via API collapses the tree, how do I keep it open? (V6.1.1)

    Using the content service, I move a node like so;

    var contentService = ApplicationContext.Current.Services.ContentService;

    contentService.Move(myIContentItem, someParentIContentItem.Id);

    The content tree then collapses (closes). I want to keep it open (expanded) and show the new position of the node I just moved.

    How do I do this in C#? Also, how do I control the speech bubble to say it's been moved (also C#)?

    Thanks.

     

     

     

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Jun 24, 2013 @ 00:27
  • Bear 40 posts 129 karma points
    Jun 24, 2013 @ 01:24
    Bear
    0

    Thanks, but I can't seem to get this working at all. According to that SO solution, it seems that I need to call

     umbraco.BasePages.BasePage.Current.ClientTools.SyncTree(doc.Parent.Path, true);

    However, intellisense reveals that "BasePage" is obsolete from that namespace and I should use;

    Umbraco.Web.UI.Pages.BasePage

    But this has no methods for getting "Current". 

  • Josiah D Thoen 18 posts 63 karma points
    Jun 24, 2013 @ 03:00
    Josiah D Thoen
    0

    The ApplicationContext.Current has a ClientTools property you could try. So ApplicationContext.Current.ClientTools.SyncTree

     

Please Sign in or register to post replies

Write your reply to:

Draft