[Zope] stuck on accessing ZSQL methods across folder hierary

Satheesh Babu vattekkat.babu at verizon.net
Sat Nov 22 18:10:35 EST 2003


This worked for me:

<dtml-in "bizlogic.product.diamond.previewsStagingList()">
    ...
</dtml-in>

- Vattekkat Satheesh Babu
http://vsbabu.org/

Brad Allen wrote:
> Yes, I have looked at the Acquisition section of the Zope book, but it 
> looks like Acquisition works through containment. What if you're trying 
> to access an object sideways across the folder hierarchy? In this case, 
> my DTML document lives in /kc/Pages/ and I want to sidle across to 
> /kc/bizlogic/product/diamond. I'm able to do that easily with Zope 
> scripts using <dtml-var 
> expr="kc.bizlogic.product.diamond.whateverscript">, but what about doing 
> this with ZSQL methonds and dtml-in?
> 
>> Have you read the Zope Book on acquisition?  What does your folder
>> hierarchy look like?   If the method can be acquired, you don't need
>> to do anything--Zope will do it for you.
>>
>> On Sat, 22 Nov 2003, Brad Allen wrote:
>>
>>>  I'm stuck trying to do something fairly basic with DTML: access an
>>>  SQL method called previewsStagingList that is somewhere else in the
>>>  folder hierarchy. I've tried numerous variant possibilities, such as
>>>
>>>  <dtml-in kc/bizlogic/product/diamond/previewsStagingList>
>>>
>>>    or
>>>
>>>  <dtml-in kc.bizlogic.product.diamond.previewsStagingList>
>>>
>>>  or
>>>
>>>  <dtml-in "../bizlogic/product/diamond/previewsStagingList">
>>>
>>>  or
>>>
>>>  <dtml-in expr = "kc.bizlogic.product.diamond.previewsStagingList">
>>>      (I think expr is just for Python scripts, according to the
>>>  documentation I've seen, but I thought this worth a try.)
>>>
>>>
>>>  You get the idea. I've searched around for documentation on how to do
>>>  this, and the closest thing I came up with was to use dtml-with, but
>>>  had no luck with that either since dtml-with doesn't seem to accept
>>>  any kind of folder paths. I tried nesting several dtml-with
>>>  documents, which parsed ok but still didn't allow me to access the
>>>  previewsStagingList ZSQL method.
>>>
>>>  I'm stuck. Please help!
>>>
>>>  Thanks!
>>>
>>>  _______________________________________________
>>>  Zope maillist  -  Zope at zope.org
>>>  http://mail.zope.org/mailman/listinfo/zope
>>>  **   No cross posts or HTML encoding!  **
>>>  (Related lists -
>>>   http://mail.zope.org/mailman/listinfo/zope-announce
>>>   http://mail.zope.org/mailman/listinfo/zope-dev )
>>>
> 
> 
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
> 






More information about the Zope mailing list