[Zope-CMF] Hmmm... problems with dependencies ...
Tres Seaver
tseaver@zope.com
Sun, 07 Apr 2002 14:41:38 -0400
Dennis Allison wrote:
> On a fresh instance of CMF (CVS, unmodified) I set up index_html to be
> customized from skins/generic. I also set up to be customized versions of
> <standard_html_header> and <standard_html_footer> and <standard_topbar>.
> Viewing the index-html from the skins/custom folder works logged in as
> admin works [Bjust fine.
>
> Viewing the site from outside dies with a template expansion error....
>
> File /home/zope/ZopeSys/Zope-2.5.0-linux2-x86/lib/python/ZPublisher/Publish.py,
> line 39, in call_object
> (Object: index_html)
> File /home/zope/ZopeSys/Zope-2.5.0-linux2-x86/lib/python/OFS/DTMLMethod.py,
> line 127, in __call__
> (Object: index_html)
> File
> /home/zope/ZopeSys/Zope-2.5.0-linux2-x86/lib/python/DocumentTemplate/DT_String.py, line 473, in __call__
> (Object: index_html)
> File
> /home/zope/ZopeSys/Zope-2.5.0-linux2-x86/lib/python/DocumentTemplate/DT_Let.py,
> line 76, in render
> (Object: folder_url=absolute_url)
> File
> /home/zope/ZopeSys/Zope-2.5.0-linux2-x86/lib/python/DocumentTemplate/DT_In.py,
> line 695, in renderwob
> (Object: objectValues( [ 'Folder', 'Portal Folder' ] ))
> KeyError: Id
>
> which stikes me as a dependency error. The DTML index_html invokes stuff that
> apparently defaults to templates rather than the equivalent DHTML. What to do?
> Is there an easy way to discover the dependencies?
>
> I would prefer to maintain the option of building a mixed site, some pages built
> with templates, some with DTML, yet others with python scripts and external procedures.
> The skin mechanism and the associated defaulting seems to get in the way of this.
> Is there any reasonable way to accomplish this? For example, how do I keep the
> same basic layout and skin when some pages are rendered using templates and
> others using DTML?
ZPT and DTML aren't designed to "mix and match" this way; I recall seeing a
recipe at the ZopeLabs Cookbook site which worked around the clash:
http://www.zopelabs.com/cookbook/996477083
> Is there a way to use the templates mechanism to create DTML?
>
> Finally, one more question. Much of the CMF functionality is buried in the
> tools layer. To change the functionality, I have to modify the tools. Are the
> interfaces and API specified somewhere? What's the recommended way to make such
> changes so that my system can track the CMF development?
The architecture for the tools is sketched out at:
http://cmf.zope.org/design/system_architecture
The up-to-date interfaces for the "stock" tools are specified in the
'interfaces' sub-packge of CMFCore:
http://cvs.zope.org/CMF/CMFCore/interfaces/
Tres.
--
===============================================================
Tres Seaver tseaver@zope.com
Zope Corporation "Zope Dealers" http://www.zope.com