Excluding directories from a Media Library

   —   
If you want to exclude specific directories from being displayed in the Media Library, please follow this short tutorial.
You can modify the condition, which selects the directories displayed in the Media library. In the following case all directories containing the string “.svn” are exluded. You need to alter the file ~\CMSModules\MediaLibrary\Controls\MediaLibrary\FolderTree.ascx.cs. The mentioned condition should be around the line 340 in the method BindTreeView.


...
if ((!dir.Contains(".svn")) && (!dir.EndsWith(hidenFolder)) && (DirectoryHelper.CheckPermissions(dir, true, false, false, false)))
...



See also:

Applies to: Kentico CMS 4.0
Share this article on   LinkedIn

Juraj Ondrus

Hi, I am the Technical support leader at Kentico. I'm here to help you use Kentico and get as much as possible out of it.