Separate folder with SQL Methods
Hello, This is my first posting on this list, so I don't know whether this question has been posted before. I am trying to access SQL Methods from a folder that is not a parent, but a sibling: /mywebsite /sql_quesries query1 query2 /html index_html welcome.html Is it possible to use the "query1" and "query2" methods from the DTML methods located in the "html" folder? Thanks in advance! Arjan Huijzer __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com
you could do this in plain dtml with: <dtml-with sql_queries> <dtml-in query1> </dtml-in> </dtml-with> the dtml-with query1 should find the sibling directory by acquisition. or if you switch to using python scripts for logic and dtml for presentation, which is my preferred method at least, you would call the query like: results=context.sql_queries.query1(any params here) which gives you a Results object to play with HTH Ben Arjan Huijzer wrote:
Hello,
This is my first posting on this list, so I don't know whether this question has been posted before.
I am trying to access SQL Methods from a folder that is not a parent, but a sibling:
/mywebsite /sql_quesries query1 query2 /html index_html welcome.html
Is it possible to use the "query1" and "query2" methods from the DTML methods located in the "html" folder?
Thanks in advance!
Arjan Huijzer
__________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com
_______________________________________________ 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 )
Arjan Huijzer schrieb:
Hello,
This is my first posting on this list, so I don't know whether this question has been posted before.
I am trying to access SQL Methods from a folder that is not a parent, but a sibling:
/mywebsite /sql_quesries query1 query2 /html index_html welcome.html
Is it possible to use the "query1" and "query2" methods from the DTML methods located in the "html" folder?
Yes, that's what Acquisition is for (please read about that in the ZopeBook). You can involve the queries by e. g. <dtml-in expr="sql_queries.query1(parameter=value)"> ... </dtml-in> from within your index_html or even a deeper hierarchy. Martin
Arjan Huijzer wrote at 2003-1-13 02:50 -0800:
This is my first posting on this list, so I don't know whether this question has been posted before. You can search the mailing list archives...
Google is your friend. You can restrict searched to the Zope mailing lists with "site:lists.zope.org" in Googles search input (or do Google search via "zope.org --> search"). Dieter
participants (4)
-
Arjan Huijzer -
Ben Avery -
Dieter Maurer -
Martin Gebert