2

I have a certain section of my website that has dozens of folders with files that should be exposed. I am currently allowing directory browsing in that specific section, but I have a couple of issues. The UI is not very friendly at the "user" level, and directory browsing, in my opinion, is better left disabled.

I have used an expandable tree view style layout before that listed all contents (similar to the tree view in windows explorer, but without the right contents pane... just the tree), but that doesn't seem very user-friendly with about two dozen folders just in the top level, with some folders have a couple hundred files in them.

I am looking to write some code for this, but I cannot think of a good way to accomplish this without using directory browsing -- which I would like to avoid using.

Does anyone have a suggestion for the general idea of how to accomplish this without directory browsing?

---UPDATE---

I ended up creating a user control to "simulate" directory browsing in specific locations. I chose to do this for a couple of reasons, one of which was to avoid having to actually enable the directory browsing setting anywhere on the site.

The main reason was that I could modify the UI to create a more user friendly experience, which includes embedding the list within my normal site layout, providing file type icons, and providing alphanumeric sorting instead of alphabetic. I found out that alphabetic sorting is very confusing to a common user, due to organizing the number 100 before the number 2, for example.

Note: For file icons, I used IconHandler 2.0, which is discussed in reasonable detail on that blog. I did not use the custom directory browsing module because it either enables directory browsing on the entire website, or the module breaks when you set enabled="false"

Jeremy
  • 169
  • 1
  • 2
  • 10
  • Creating a server-side control to scan the directories and present a view sounds like a reasonable approach. Just make sure that both type-to and scrolling work well if they're going to be looking through 200 files. You could also implement a search or filter box. –  Feb 15 '13 at 18:36
  • Are the file names in a database somewhere? I've used a jquery treeview http://bassistance.de/jquery-plugins/jquery-plugin-treeview/ with some luck – Steve Stokes Feb 15 '13 at 18:57
  • @ebyrob A control definitely sounds like the way to go. When you say "view" though, I'm not entirely sure what you mean. Are you referring to an MVC view? I like the bit about type-to and a search filter. Any input on how to handle the structure? Rebind the "view" if a folder is clicked using a link, or display the whole structure in the view? – Jeremy Feb 15 '13 at 19:05
  • No, not MVC, just that a user needs to know what's there before they can interact with it. (e.g. download a file, view an image etc) So make it convenient to "view" the directory/file structure including all files. –  Feb 15 '13 at 19:07
  • @SteveStokes Unfortunately, the ones I'm referring to are not. The newest files are, but there are thousands of old ones that are not, and those are the ones I need to show. – Jeremy Feb 15 '13 at 19:09
  • @ebyrob Any input on how to handle the structure? Rebind the "view" if a folder is clicked to go down a level, and display the file itself if a file is clicked? Or were you thinking of a different way of handling that? – Jeremy Feb 15 '13 at 19:11
  • At a basic level, yes. Just load another page when they change directories. Also load a page when they select a file etc. (not sure how often for the search/filter stuff some client side code may be helpful there) Note: it's probably not hard to generate a table with directory listings, but ... why bother? Unless maybe for security reasons you want to do this. –  Feb 15 '13 at 19:14
  • You could create a tool to directory browse and enter all the files into the database, then this becomes very easy. – Steve Stokes Feb 15 '13 at 19:20
  • @ebyrob Thanks a bunch. I think you've sparked some good thought and I believe I have something to go on from here. – Jeremy Feb 15 '13 at 19:26
  • @SteveStokes That would potentially be an option, but the database that holds the files now has a fairly extensive set of metadata pertaining to each file. I'm not sure this would be very useful for all of the past files. I will look into the feasibility of it though. Thanks! – Jeremy Feb 15 '13 at 19:31

0 Answers0