[Zope] Properties of documents
Craig Allen
cba@mediaone.net
Tue, 27 Apr 1999 19:21:01 -0400
> is there a way that every DTML document in a specified folder will
> always have a certain set of properties instead of just the 'title'
> which comes as default?? is there somewhere to set this up without
> having to set the property everytime a new document is created??
>
Check the Zope Manager's Guide in the chapter called 'Creating Zope
Products'. It describes - and provides an example (yes!) of the use of
the manage_clone method. Create a document, add the properties you
want, and then use the manage_clone method. I think this is what you
were asking for. I don't know as manage_clone is documented anywhere.
The following snippets creates a new DTML Document and sets property
values based on form values:
<!--#with
"manage_clone(RestDetailTemplate,REQUEST['new_id'],REQUEST)"-->
<!--#call "manage_changeProperties(
RestName=REQUEST['new_name'],
RestRating=REQUEST['new_rating'],
RestPhone=REQUEST['new_phone'],
RestStreet=REQUEST['new_street'],
RestCity=REQUEST['new_city'],
RestState=REQUEST['new_state'],
RestText=REQUEST['new_text'],
)"-->
<!--#/with-->