Dave Burke : Freelance .NET Web Developer specializing in Online Communities

CS Nuglet: Displaying subfolders in CS 2.1 File Galleries

In Community Server 2.0, categories were displayed as subfolders in the File Gallery Folder Tree.  As everyone knows by now, categories are now tags in CS 2.1, and as part of that change are no longer by default displayed as subfolders in the File Galleries treeview control.  They are instead displayed as a tag group above the file listing.  Sweet.  This keeps the folder structure clean with broader context-driven access through the tag group.  But if we really want to display tags as subfolders in the treeview we can still do so.

Ben Tiedt, with godlike knowledge of Community Server like those other Core Team Devs (Jose, Ken, Kevin, Dan and some guy named ScottW), mentioned how to do this on a CS forums reply yesterday.

You *can* display tags in the navigation tree by setting ShowCategories="true" on all FolderTree controls.  FolderTree controls are defined within the default.aspx, viewCategory.aspx, viewEntry.aspx, viewFolder.aspx, and viewFolderGroup.aspx pages in the web/files folder.

It's tempting to add the ShowCategories property with the Skin-FolderTree.ascx control which already lists a bunch of properties, but that would be wrong.  As Ben says, we add it to the .aspx control statements.  Here is what it looks like on /files/default.aspx.


<FileGalleries:FolderTree runat="server" ID="FolderTree"
               PreLoadCategories="true" ShowCategories="true" />

 

Comments (4) | Post RSS RSS comment feed

Posted on 10/26/2006 10:25:37 PM by Dave Burke
Categories: Community Server
Tags: no tags for this post

Related posts

Comments (4) -

10/27/2006 6:29:32 PM Permalink

Thanks for hunting this solution down.

Tod Birdsall |

10/27/2006 11:51:53 PM Permalink

Very nice, Dave Smile

I don't know how could I miss this one :-P

Keyvan Nayyeri |

10/28/2006 6:30:10 AM Permalink

It's okay, Keyvan.  You can't know everything about CS.  I can't believe I missed this one, too.  Another nod to Ben Tiedt!

Tod, certainly welcome.  I loved your tutorial yesterday, btw!  Hey, please test this approach before deploying.  I've encountered some focus issues where the subfolders display initially, then do not re-appear.  Could be more trouble than its worth.

daveburke |

10/28/2006 1:06:27 PM Permalink

Actually I didn't say I've missed the hack :-D  I had missed your blog post Wink

That focus issue isn't limited to subfolders, I have same troubles with folders themselves.

Keyvan Nayyeri |


Powered by BlogEngine.NET 2.0.0.36
Theme by Dave Burke