[Zope-CMF] Dreamweaver and webdav with zope/cmf

Chris Withers chrisw@nipltd.com
Thu, 13 Mar 2003 12:46:04 +0000


Sally Owens wrote:
> Hi,
> 
> mode')? I realise that this stems from Dreamweaver's inability to handle 
> files without .html file extensions, but I wondered whether the only 
> solution really *is* to name all our files '*.html' in our CMF site 
> (this seems to go against the way Zope and CMF were written)?!

CMF is extremely agnostic about what the id's of files are.
Zope is almost as agnostic, the only difference being that if you have document 
you would normally call 'index_html' but now want to call 'index.html', they may 
not work as expected.

This python script in one of your skin layers should do the trick though:

return getattr(context,'index.html').view()

> rename all our files with .html extensions what will 'break'? Can we 
> just handle this with Apache rules (to look for index.html rather than 
> index_html)

I hadn't thought of using Apache to correct this, but there are soem edge cases 
which mean the above method is probably better in the long run...

> 2] Can Dreamweaver handle content types other than the default 
> 'Document'? We have written lots of content types will additional fields 
> and when I view these in Dreamweaver, the content of these fields isn't 
> there. Is there any configuration that can be done to ensure that 
> Dreamweaver (or webdav? Not sure where this problem lies) 'sees' the 
> fields of content types other than 'Document'?

As Tonico described, the handling of WebDAV and FTP content access is handled by 
the manage_FTPget and PUT methods. if your content types are based on 
'Document', these are implemented in CMFDefault/Document.py.

To handle your content types, you'd need to write a 'new' Document.py that new 
about the extra properties you wanted to edit.
However, bear in mind that people using Dreamweaver will be expecting to edit a 
standard html file of the form:

<html>
<head>
</head>
<body>
</body>
</html>

How will they know where to insert the extra properties in that structure.
They could put then in, for example, <meta> tags in the <head>, btu what would 
happen if they ommitted them?

> 3] I had assumed that when editing content via Dreamweaver you would be 
> able to see the content *within* the appropriate template, but from my 
> experiments so far this doesn't seem the case. Can Dreamweaver do this? 

If you're talking about editing ZPT's with Dreamweaver, then you need to be 
connecting to the WebDAV sourceport rather than the normal HTTP port to get the 
document source rather than the rendered output.

cheers,

Chris