Try our conversational search powered by Generative AI!

Mark objects as "in use"

Vote:
 

I have a contentarea where one can point out a media folder and it will list all files under that root, like this:

  private IEnumerable GetMediaDataFilesFromRoot(ContentReference folder)
        {
        if (folder == null)
        {
            return new List();
        }

        return contentLoader.GetDescendantsOfType(folder);
        }
 The problem is that when listing files from a root instead of "dragging and dropping" them onto the contentarea itself, is that EpiServer will not detect the files as "being in use". However, when I drop a file directly to the contentarea it gets marked as in use. Is it possible to modify this setting programmatically so all of the children files of my desired root will get marked as "in use" as well? 

For image, See this question: http://stackoverflow.com/questions/32845997/episerver-marks-rootchildren-as-not-in-use

#139311
Sep 29, 2015 16:08
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.