[Zope-PTK] Filesystem Directory View

Shane Hathaway shane@digicool.com
Fri, 23 Feb 2001 11:11:37 -0500


Lucas Hofman wrote:
> 
> Would it be possible to have the actual directory the Filesystem
> Directory View object refers to as a property?
> 
> That would make it much easier to implement a named custom skin in a
> directory away from PTKDemo. I know a product like LocalFS could do the
> same, but that is unnecesary complicated compared to filling in a
> property.

Actually DirectoryView has a better way: when you create your filesystem
product, add to its __init__.py the following statements:

from Products.PTKBase.DirectoryView import registerDirectory
registerDirectory('skins', globals())

Then create a "skins" directory in your product.  All of the directories
in your skins folder will be available as directory views.

We specifically avoided making it a property because of portability and
security concerns.

Shane