[Zope] (urgent) manage_changeProperties(data='new content')problem

Peter Bengtsson mail@peterbe.com
Wed, 13 Jun 2001 12:04:05 +0200


Perhaps this rings a bell?
newdata="""<dtml-var standard_html_header>
<h2><dtml-var title_or_id></h2>
<p>
This is the <dtml-var id> Document.
</p>
<dtml-var standard_html_footer>"""

As conluded by Chris McDonough, there seems to be a bug with when this
stringvariable looks XMLish. Perhaps this is because you must never be
allowed to save false DTML syntax and that can cause problems.
This can solve the problem:
context.dtmldocument.manage_changeProperties(storyboardproperty=newdata)

----- Original Message -----
From: "Bill Anderson" <bill@libc.org>
To: <zope@zope.org>
Sent: Tuesday, June 12, 2001 7:34 PM
Subject: Re: [Zope] (urgent) manage_changeProperties(data='new
content')problem


> On 12 Jun 2001 18:15:18 +0200, Peter Bengtsson wrote:
> > This works:
> > context.dtmldocument.manage_changeProperties(title='New Title')
> >
> > This does NOT work:
> > context.dtmldocument.manage_changeProperties(data='<dtml-var hello>')
>
> This will make data be: <dtml-var hello>
>
>
> You can't put DTML in a python assignmetn and expect it to be evaluated.
>
>
> If hello is available in the local namespace, you could do:
> context.document.manage_changeProperties(data=hello)
>
> you _may_ need to make it ...(data=hello())
>
> it depends on what hello is/does.
>
> Bill
>
>
>
> _______________________________________________
> 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 )
>