namespace strangeness.
If I do a method called namespace that I call with namespace?site=test, like so: <dtml-with billing> <dtml-with "_[site]"> <dtml-var title_or_id> </dtml-with> </dtml-with> (<dtml-var "_[site]"> does render test properly.) The title_or_id is the title of billing, not of test. if I do <dtml-with billing> <dtml-with test> <dtml-var title_or_id> </dtml-with> </dtml-with> it prints properly. What do I have to do to get what the site varible equals on the stack? thanks, -- ethan mindlace fremen mindlace@imeme.net zope -&- imap email -&- mailing list weave your web with the web at http://imeme.net
I am wondering if "_['site']" is really what you meant to do? On Sun, 23 Apr 2000, you wrote:
If I do a method called namespace that I call with namespace?site=test, like so:
<dtml-with billing> <dtml-with "_[site]"> <dtml-var title_or_id> </dtml-with> </dtml-with>
(<dtml-var "_[site]"> does render test properly.)
The title_or_id is the title of billing, not of test.
if I do
<dtml-with billing> <dtml-with test> <dtml-var title_or_id> </dtml-with> </dtml-with>
it prints properly. What do I have to do to get what the site varible equals on the stack?
thanks, -- ethan mindlace fremen mindlace@imeme.net zope -&- imap email -&- mailing list weave your web with the web at http://imeme.net
_______________________________________________ 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 ) -- ======================================================
Luis Cortes Pollak EPD (915) 621-6113 ======================================================
Luis Cortes wrote:
I am wondering if "_['site']" is really what you meant to do?
<dtml-with "_['site']"> gives the same answer. Along this vein, where site=demo <dtml-var "_[site]"> renders the demo object, but if test has a property domain, <dtml-var "_[site].domain"> (or <dtml-var "_['site'].domain">) raises the following error: 'string' object has no attribute 'domain' <!-- Traceback (innermost last): File /imeme/zope/lib/python/ZPublisher/Publish.py, line 214, in publish_module File /imeme/zope/lib/python/ZPublisher/Publish.py, line 179, in publish File /imeme/zope/lib/python/Zope/__init__.py, line 202, in zpublisher_exception_hook (Object: ElementWithAttributes) File /imeme/zope/lib/python/ZPublisher/Publish.py, line 165, in publish File /imeme/zope/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: pay) File /imeme/zope/lib/python/ZPublisher/Publish.py, line 102, in call_object (Object: pay) File /imeme/zope/lib/python/OFS/DTMLMethod.py, line 145, in __call__ (Object: pay) File /imeme/zope/lib/python/DocumentTemplate/DT_String.py, line 502, in __call__ (Object: pay) File /imeme/zope/lib/python/DocumentTemplate/DT_With.py, line 148, in render (Object: billing) File /imeme/zope/lib/python/DocumentTemplate/DT_Util.py, line 335, in eval (Object: _[site].domain) (Info: site) File <string>, line 0, in ? File /imeme/zope/lib/python/DocumentTemplate/DT_Util.py, line 127, in careful_getattr AttributeError: (see above) --> Now, I *know* that the string object site has no attribute domain, but the demo object does indeed have the attribute domain, and doing <dtml-var "demo.domain"> -- ethan mindlace fremen mindlace@imeme.net zope -&- imap email -&- mailing list weave your web with the web at http://imeme.net
participants (2)
-
Luis Cortes -
mindlace