[Zope-CMF] portal_skins file system view property

Chris Withers chrisw@nipltd.com
Tue, 25 Feb 2003 13:49:49 +0000


Ronald L Roeber wrote:
> 
> I've moved a bushel of CMF sites to a new server. The new server uses 
> INSTANCE_HOME but helpfully keeps the Filesystem View property from the 
> old server.
> 
> How do I return and change the 'Filesystem View' property for each skin? 

Go to the skins tool.
Click on each FSDV in turn and go to the properties tab.
Enter the correct path.

> Has anyone written such a script/external method?

Here's a Script(Python) that did the job for me:
for object in context.objectValues():
   if object.meta_type=='Filesystem Directory View':
     print '/'.join(object.getDirPath().split('/')[2:])
     print object.manage_properties('/'.join(object.getDirPath().split('/')[2:]))

return printed

You may need to tweak the second print statement line...


cheers,

Chris