Re: [Zope] restrictedTraverse - yay! :-)
Dennis Nichols wrote: At 9/15/00 10:05 AM, Chris Withers wrote: So: dtml-var "restrictedTraverse('slash/delimited/path')" absolute_url will work as I expect it to? Well, I don't know what you expect :-) When I try to save such a construct with the handy-dandy Change button I get Document Template Parse Error Invalid attribute name, "absolute_url", for tag dtml-var "restrictedTraverse(choice)" absolute_url ... Yeah. That's right. There is no attrubute absolute_url. There is, however, a method absolute_url(). This should do what you expect: dtml-var "restrictedTraverse('slash/delimited/path').absolute_url()" -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] restrictedTraverse - yay! :-)
At 9/15/00 10:05 AM, Chris Withers wrote: So: dtml-var "restrictedTraverse('slash/delimited/path')" absolute_url will work as I expect it to? Well, I don't know what you expect :-) When I try to save such a construct with the handy-dandy Change button I get Document Template Parse Error Invalid attribute name, "absolute_url", for tag dtml-var "restrictedTraverse(choice)" absolute_url ... -- Dennis Nichols [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] restrictedTraverse - yay! :-)
+---[ Dennis Nichols ]-- | At 9/15/00 10:05 AM, Chris Withers wrote: | So: | | dtml-var "restrictedTraverse('slash/delimited/path')" absolute_url | | will work as I expect it to? | | Well, I don't know what you expect :-) When I try to save such a construct | with the handy-dandy Change button I get | | Document Template Parse Error | Invalid attribute name, "absolute_url", for tag dtml-var | "restrictedTraverse(choice)" absolute_url ... dtml-var "restrictedTraverse(choice).absolute_url()" I think is what is required. -- Totally Holistic Enterprises Internet| P:+61 7 3870 0066 | Andrew Milton The Internet (Aust) Pty Ltd | F:+61 7 3870 4477 | ACN: 082 081 472 ABN: 83 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068|[EMAIL PROTECTED]| ___ Zope maillist - [EMAIL PROTECTED] 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 )