If I understand you correctly you want to have default folder of file manager according to your requriement not PageFiles as standard. One way could be to move your required VVP in web.config at the top of the list. For example if you want Documents to be start folder in file mananger then do like this:
<add showInFileManager="true" virtualName="Documents" virtualPath="~/Documents/" bypassAccessCheck="false" maxVersions="5" name="SiteDocuments" type="EPiServer.Web.Hosting.VirtualPathVersioningProvider,EPiServer" physicalPath="C:\R2Projects\R2SP1-1\Files\Documents" />
Is that what you required ?
No unfortunately not that's now what I want to do. I know that the first "folder" in the vpp settings is the one that the filemanager will default too.
Using youre example with the documents folder I would like the editor to enter the filemanger with eg /Documents/<folder> where <folder> is a subfolder read from a dynamic property.
I have been running into the same problem. This thread is one year old which hopefully might have brought some wisdom into the community.
Does anybody have a clue on how to do that without rewriting the VirtualPathNavigator.ascx in UI\CMS\Hosting?
In CMS 4 it was possible to in global.asax attach to an a unifiedfilesystem event like below. Then we could check a dynamic property to see if the default folder for an editor should be a subfolder. E.g /upload/external-documents.
I haven't figured out how to do this in CMS5. Has anyone out there managed to accomplish this?
//UnifiedFileSystem.ResolvingDefaultDirectory += new FileSystemEventHandler(ResolveBasedOnProperty);