[GeneralDiscussion] Re: zope/plone article
[email protected] (Simon Michael) Fri, 06 Mar 2009 11:58:49 -0800
| Newsgroups | gmane.comp.web.zope.zwiki |
|---|---|
| Message-ID | <7C689469-0F72-4A00-B4D0-A0F5EFE6C24E__10703.9666887887$1236369640$gmane$org@joyful.com> |
> I have another bug - this time in Preview mode where it isn't
> previewing correctly because the temporary page object isn't copying
> its attributes from its master page (e.g. "allow_dtml=1"). In
> common.py:renderText():
>
> # make a new page object, like in create
> p = page.__class__(__name__=page.getId())
> p.title = page.pageName()
> p = p.__of__(page.aq_parent)
> p.setPageType(self.id())
> p.setText(text)
> return p.render(
>
> Here it sets up the temporary page object and it doesn't copy over
> attributes. Therefore, previewing a page with DTML enabled just for
> that page doesn't work.
>
> Fraid I have no idea how to copy across attributes in Zope.
> p.setattr('allow_dtml', page.getattr('allow_dtml',0)) is fairly
> obvious but I couldn't figure out how to iterate all attributes.
True, thank you, forwarding to the issue tracker.
--
forwarded from http://zwiki.org/GeneralDiscussion#[email protected]