I played around a little, and here's something I came up with to make the folder tree update when you open a folder. It works for me locally.
First, start with Wes's script in the other thread.
Next, in Browse.aspx.vb at around Line 150, you should see the following:
TheDocumentBrowser.BaseUrl = Request.ApplicationPath & "/" & dbid & "/fol/" & StartFolderID & "/Row{0}.aspx"
SetBrowserStartID(StartFolderID)
You'll want to add "TheFolderTree.OpenFolder(StartFolderID)" between those lines, so you end up with:
TheDocumentBrowser.BaseUrl = Request.ApplicationPath & "/" & dbid & "/fol/" & StartFolderID & "/Row{0}.aspx"
TheFolderTree.OpenFolder(StartFolderID)
SetBrowserStartID(StartFolderID)
In the same document Browse.aspx.vb, you should see the following around line 273:
If args.SelectedEntryType = Entry_Type.ENTRY_TYPE_FOLDER Then
If EntryIDToOpen <> args.SelectedEntryID Then
' Open a shortcut -- this function retrieves the path to the folder
SetBrowserStartID(EntryIDToOpen)
'TheFolderMetadata.OpenFolder(EntryIDToOpen)
Else
' Open a child of the current folder -- the path is already known
SetBrowserStartID(EntryIDToOpen)
'TheFolderMetadata.OpenChildOfCurrentFolder(EntryIDToOpen, args.SelectedEntryName, args.SelectedEntryFlags, True)
End If
Else
Lines beginning in ' are code comments; the ones I put in bold are old code snippets pertaining to the folder tree, left in the document as comments to show how to invoke the old code. So you'll see that our replacement code is actually quite similar to those code comments. You'll want to replace the above with the following:
If EntryIDToOpen <> args.SelectedEntryID Then
' Open a shortcut -- this function retrieves the path to the folder
SetBrowserStartID(EntryIDToOpen)
TheFolderTree.OpenFolder(EntryIDToOpen)
Else
' Open a child of the current folder -- the path is already known
SetBrowserStartID(EntryIDToOpen)
TheFolderTree.OpenChildOfCurrentFolder(EntryIDToOpen, args.SelectedEntryName, args.SelectedEntryFlags, True)
End If
^(this snippet updated May 2015)
Finally, in the same file Browse.aspx in the method FolderBreadcrumbNavigation_ClickedBreadcrumb at around line 300, you want to do something similar.
Before:
Private Sub FolderBreadcrumbNavigation_ClickedBreadcrumb(ByVal sender As Object, ByVal e As WebLinkControls.ClickedBreadcrumbEventArgs) Handles FolderBreadcrumbNavigation.ClickedBreadcrumb
SetBrowserStartID(e.SelectedFolderID)
'TheFolderMetadata.OpenFolder(e.SelectedFolderID)
End Sub
After:
Private Sub FolderBreadcrumbNavigation_ClickedBreadcrumb(ByVal sender As Object, ByVal e As WebLinkControls.ClickedBreadcrumbEventArgs) Handles FolderBreadcrumbNavigation.ClickedBreadcrumb
SetBrowserStartID(e.SelectedFolderID)
TheFolderTree.OpenFolder(e.SelectedFolderID)
End Sub
Whew! That may look like a lot, but in reality you're only changing five lines of code in one file. :)
Remember to recompile the solution before testing. Let me know how that works out!!