[Zope-CMF] RE: CMF 1.2 and ZPT

Tres Seaver tseaver@zope.com
Tue, 02 Apr 2002 23:38:38 -0500

Norm DeLisle wrote:
> I found that the self-correcting process can be avoided by making the
> changes in a customized version of the main_template.
> "I've just installed CMF 1.2 running in the Zope 2.4.3 environment
> with the intent of moving from dtml to zpt.
> I'm experiencing what to me is strange behavior in the zmi.
> As with dtml, I started to edit the page templates supplied in the
> portal skins folder by selecting say index_html from zpt_generic,
> making some edits, and reviewing them in the custom skins folder.
> Upon review I find the changes are not in the new version. I can
> change templates outside of zope with a text editor and upload
> those.. when they are created as new page template objects.
> Anyone have insight into this behavior. I'd hate to be forced into
> always working outside of zope for even minor changes."

It sounds as though you are making changes in the area "between"
the METAL slots, which are then being stepped up by macro expansion.
If your ZPT starts off with 'use-macro',
then you mustn't expect your edits to take effect except within
block tags delimited with 'fill-slot', e.g.::

   <html metal:use-macro="here/standard_template/macros/main">

   <h1> This tag will go away! </h1>

   <div metal:fill-slot="main">
     <p> Edits here should stick.

Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com