[Zope] File System Directory View

Dieter Maurer dieter at handshake.de
Fri Nov 7 16:38:04 EST 2003


Charlie Jones wrote at 2003-11-6 20:59 -0500:
 > I am interested in reading more about adding static/unmanaged html 
 > content to plone instance using File System Directory Views or the 
 > plone skins tool.  Can anyone point me in the right direction for some 
 > reading?  I seem to be looking in the wrong places.

It is very simple:

  *  You use the CMF and its "SkinsTool" (--> "portal_skins").
     If you do not like the complete CMF setup, you
     can use my "SkinnedFolder"

       <http://www.dieter.handshake.de/pyprojects/zope>

  *  You register one (or more) folder as top level
     directory views:

	 from Products.CMFCore.DirectoryView import registerDirectory

	 # make "skins" folder in current product available as FSDV
	 registerDirectory('skins', globals())

  *  You create a "Filesystem Directory View" in your skins tool
     (--> add list --> "Filesystem Directory View")

  *  You put your files in the corresponding folder in the file
     system.

  *  You may need to register the extensions of your files
     such that "Filesystem Directory View" knows how to
     map the files to Zope objects:

	 from Products.CMFCore.DirectoryView import registerFileExtension
	 from Products.CMFCore.FSFile import FSFile
	 ...
	 registerFileExtension('html', FSFile)


That's it.

-- 
Dieter



More information about the Zope mailing list