convert DTML Document to a folder.
Hello, Is it possible to convert a DTML Document to a folder, Both with properties ? I use Zope 2.8.4. Regards, Martin Koekenberg
--On 16. November 2005 15:35:14 +0100 Martin Koekenberg <martin@digital-adventures.nl> wrote:
Hello,
Is it possible to convert a DTML Document to a folder, Both with properties ? I use Zope 2.8.4.
Converting a piece of textual content to a folder makes no sense. WHat are you trying to do??? -aj
The DTML Documents are userinfo documents. I want to create a photoorder form and generate a dtml document with that users orders. I want to place that in his user folder. Martin Koekenberg -----Original Message----- From: Andreas Jung <lists@andreas-jung.com> To: Martin Koekenberg <martin@digital-adventures.nl>, zope@zope.org Date: Wed, 16 Nov 2005 15:42:35 +0100 Subject: Re: [Zope] convert DTML Document to a folder.
--On 16. November 2005 15:35:14 +0100 Martin Koekenberg <martin@digital-adventures.nl> wrote:
Hello,
Is it possible to convert a DTML Document to a folder, Both with properties ? I use Zope 2.8.4.
Converting a piece of textual content to a folder makes no sense. WHat are you trying to do???
-aj
So, you'd like to turn an independent entry into a container to hold more info? -Jon Martin Koekenberg wrote:
The DTML Documents are userinfo documents.
I want to create a photoorder form and generate a dtml document with that users orders. I want to place that in his user folder.
Martin Koekenberg -----Original Message----- From: Andreas Jung <lists@andreas-jung.com> To: Martin Koekenberg <martin@digital-adventures.nl>, zope@zope.org Date: Wed, 16 Nov 2005 15:42:35 +0100 Subject: Re: [Zope] convert DTML Document to a folder.
--On 16. November 2005 15:35:14 +0100 Martin Koekenberg <martin@digital-adventures.nl> wrote:
Hello,
Is it possible to convert a DTML Document to a folder, Both with properties ? I use Zope 2.8.4.
Converting a piece of textual content to a folder makes no sense. WHat are you trying to do???
-aj
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
-- Jonathan Cyr http://www.cyr.info http://www.weddingweblog.com cyrj@cyr.info
yes, That was my idea. Is there a solution for that convert. Martin Koekenberg -----Original Message----- From: Jonathan Cyr <cyrj@cyr.info> To: Martin Koekenberg <martin@digital-adventures.nl> Cc: zope@zope.org Date: Fri, 18 Nov 2005 17:21:00 -0500 Subject: Re: [Zope] convert DTML Document to a folder. So, you'd like to turn an independent entry into a container to hold more info? -Jon Martin Koekenberg wrote: The DTML Documents are userinfo documents. I want to create a photoorder form and generate a dtml document with that users orders. I want to place that in his user folder. Martin Koekenberg -----Original Message----- From: Andreas Jung <lists@andreas-jung.com> To: Martin Koekenberg <martin@digital-adventures.nl>, zope@zope.org Date: Wed, 16 Nov 2005 15:42:35 +0100 Subject: Re: [Zope] convert DTML Document to a folder. --On 16. November 2005 15:35:14 +0100 Martin Koekenberg <martin@digital-adventures.nl> wrote: Hello, Is it possible to convert a DTML Document to a folder, Both with properties ? I use Zope 2.8.4. Converting a piece of textual content to a folder makes no sense. WHat are you trying to do??? -aj _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Jonathan Cyr http://www.cyr.info http://www.weddingweblog.com cyrj@cyr.info
Martin Koekenberg wrote:
yes,
That was my idea. Is there a solution for that convert.
Martin Koekenberg
well, sort of, but there is no converting. Here's a suggestion, that may work for you assuming that I understand the problem properly: The DTML-document contains some sort of information that you need to keep, but you also need to store stuff inside of it. The most obvious solution is to create a folder with the same name as the DTML-document, put the DTML-document inside the folder and rename the doc to Index_html. moving all properties from the doc to the folder and presto, there you have it. renaming the doc index_html gives you url-compliance with previous urls, ie if you had /some/url/the_doc, you can still keep /some/url/the_doc, because it will automagically render /some/url/the_doc/index_html for you. The API for creating and getting properties is availabel in the Zope Help from the ZMI. HTH and Good luck! /dario
-----Original Message----- From: Jonathan Cyr <cyrj@cyr.info>
So, you'd like to turn an independent entry into a container to hold more info?
-Jon
Martin Koekenberg wrote:
The DTML Documents are userinfo documents.
I want to create a photoorder form and generate a dtml document with that users orders. I want to place that in his user folder.
Martin Koekenberg -----Original Message----- From: Andreas Jung
--On 16. November 2005 15:35:14 +0100 Martin Koekenberg
<martin@digital-adventures.nl> wrote:
Hello,
Is it possible to convert a DTML Document to a folder, Both with properties ? I use Zope 2.8.4.
Converting a piece of textual content to a folder makes no sense. WHat are you trying to do???
-aj
-- Jonathan Cyr
http://www.cyr.info http://www.weddingweblog.com
cyrj@cyr.info
-- -- ------------------------------------------------------------------- Dario Lopez-Kästen, IT Systems & Services Chalmers University of Tech. Lyrics applied to programming & application design: "emancipate yourself from mental slavery" - redemption song, b. marley
Martin Koekenberg wrote at 2005-11-16 15:35 +0100:
Is it possible to convert a DTML Document to a folder, Both with properties ? I use Zope 2.8.4.
As you explained in a later message, you seem only be interested in the document's properties. This is possible (but requires a bit of work from you): You use the "PropertyManager" API (partially documented in Zope's online help system; implemented (and documented via docstrings) in "OFS.PropertyManager.PropertyManager") to ask the document for its property info and to recreate the same properties on the folder. You will do this in a script (implemented by yourself; there is rarely a need to convert a document into a folder (and as Andreas explained, it is usually impossible)). -- Dieter
participants (5)
-
Andreas Jung -
Dario Lopez-Kästen -
Dieter Maurer -
Jonathan Cyr -
Martin Koekenberg