Re: [Zope-dev] dynamically using inheritance
Thanks for the reply. I tried this out, and I'm getting a key error: Hmmm... Any other suggestions? Should I specify with PARENTS first? Thanks again! -e- Site Error An error was encountered while publishing this resource. KeyError Sorry, a site error occurred. Traceback (innermost last): File /usr/local/dc/zope/lib/python/ZPublisher/Publish.py, line 223, in publish_module File /usr/local/dc/zope/lib/python/ZPublisher/Publish.py, line 187, in publish File /usr/local/dc/zope/lib/python/Zope/__init__.py, line 226, in zpublisher_exception_hook (Object: dev_site) File /usr/local/dc/zope/lib/python/ZPublisher/Publish.py, line 171, in publish File /usr/local/dc/zope/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: index_html) File /usr/local/dc/zope/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: index_html) File /usr/local/dc/zope/lib/python/OFS/DTMLDocument.py, line 199, in __call__ (Object: index_html) File /usr/local/dc/zope/lib/python/DocumentTemplate/DT_String.py, line 546, in __call__ (Object: index_html) File /usr/local/dc/zope/lib/python/DocumentTemplate/DT_With.py, line 133, in render (Object: _[skinname]) File /usr/local/dc/zope/lib/python/DocumentTemplate/DT_Util.py, line 231, in eval (Object: _[skinname]) (Info: _) File <string>, line 2, in f (Object: guarded_getitem) File /usr/local/dc/zope/lib/python/AccessControl/DTML.py, line 104, in guarded_getitem (Object: index_html) File /usr/local/dc/zope/lib/python/AccessControl/ZopeGuards.py, line 151, in guarded_getitem KeyError: skins.default On Mon, 4 Feb 2002, R. David Murray wrote:
On Sat, 2 Feb 2002, Ed Colmar wrote:
<dtml-call "REQUEST.set('skinname', 'skins.default')"> <dtml-with "_.string(skinname)">
This is a zope@zope.org question rather than a zope-dev question, but:
<dtml-with "_[skinname]">
should solve your problem. That looks the string held in skinname up in the namespace and passes it to dtml-with.
--RDM
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Hey! After trying out a few different combinations I got this to work. Thanks again for the syntax! <dtml-call "REQUEST.set('skinname', 'default')"> <dtml-with "skins"> <dtml-with "_[skinname]"> <dtml-var standard_skin_stuff> </dtml-with> </dtml-with>
participants (1)
-
Ed Colmar