I didn't see this in the contributions, so I will put this one up. This is a real simple hack. I wanted a directory tree that showed top-level categories and the products under the categories. This doesn't work as well for sub-categories. I'm sure if you want to customize it further, it won't be too much work. To reduce confusion, I am putting all code between the tags <code></code>. These two tags should not be copied into any of your scripts.