Can I change types of existing objects (DTML Document -> Page Template)
I have a bunch of DTML Documents. How do I convert their type to Page Templates? Yours, Noah
Yes, but it wouldnt make much sense DTML Documents are totally different, for a start they contain DTML. You must manually convert them. -- Andy McKay Agmweb Consulting http://www.agmweb.ca ----- Original Message ----- From: "Noah" <noah@noah.org> To: <zope@zope.org> Sent: Thursday, August 15, 2002 8:39 PM Subject: [Zope] Can I change types of existing objects (DTML Document -> Page Template)
I have a bunch of DTML Documents. How do I convert their type to Page Templates?
Yours, Noah
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
On Thu, Aug 15, 2002 at 11:43:16PM -0700, Andy McKay wrote:
Yes, but it wouldnt make much sense DTML Documents are totally different, for a start they contain DTML. You must manually convert them.
Still, it's a good question. How would one change the object class? (I have a different reason for wanting to do this.) -- Michael S. Fischer / michael at dynamine.net / +1 650-533-4684 Lead Hacketeer, Dynamine Consulting, Silicon Valley, CA
Michael S. Fischer wrote:
On Thu, Aug 15, 2002 at 11:43:16PM -0700, Andy McKay wrote:
Yes, but it wouldnt make much sense DTML Documents are totally different, for a start they contain DTML. You must manually convert them.
Still, it's a good question. How would one change the object class? (I have a different reason for wanting to do this.)
Write a PythonScript or ExternalMethod that copies your objects with the document source and all properties to a new object. - rename your old object to 'objectID_old' [manage_renameObject] - create a new object with 'objectID' [manage_addProduct[...]...] - copy the document source from id_old to id [depends on your classes] - copy the properties from id_old to id [see PropertyManager] - delete 'objectID' [manage_delObjects] spelling this in python should not be very difficult... cheers maik. -- Maik Jablonski __o www.zfl.uni-bielefeld.de _ \<_ Deutsche Zope User Group Bielefeld, Germany (_)/(_) www.dzug.org
Maik Jablonski wrote:
- delete 'objectID' [manage_delObjects]
uuuppsss. early in the morning... important correction: - delete 'objectID_old' -mj -- Maik Jablonski __o www.zfl.uni-bielefeld.de _ \<_ Deutsche Zope User Group Bielefeld, Germany (_)/(_) www.dzug.org
Sorry, I should have mentioned that they only contain plain HTML. Their *TYPE* is DTML in Zope, but they contain no DTML tags. I want their Zope type to be Page Template because I intend to start adding TAL stuff to them... These file got imported as default type DTML. By the way, does it matter that they all have .html extensions? Yours, Noah -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Andy McKay Sent: Thursday, August 15, 2002 11:43 PM To: Noah; zope@zope.org Subject: Re: [Zope] Can I change types of existing objects (DTML Document -> Page Template) Yes, but it wouldnt make much sense DTML Documents are totally different, for a start they contain DTML. You must manually convert them. -- Andy McKay Agmweb Consulting http://www.agmweb.ca ----- Original Message ----- From: "Noah" <noah@noah.org> To: <zope@zope.org> Sent: Thursday, August 15, 2002 8:39 PM Subject: [Zope] Can I change types of existing objects (DTML Document -> Page Template)
I have a bunch of DTML Documents. How do I convert their type to Page Templates?
Yours, Noah
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (4)
-
Andy McKay -
Maik Jablonski -
Michael S. Fischer -
Noah