[Zope] Discovering the path and querying on it....

Rustad, Aaron ARustad@Online-can.com
Thu, 16 Aug 2001 15:55:26 -0600


I would like to query a table based on the current object I am working on.
For example...I am trying to populate a menu, and I want it dynamically
filled based on the page I am on. I know how to get the path, I am using :

<dtml-var PATH_INFO>

I have a Z SQL Method that looks like this:

SELECT menu_item, link_path 
  FROM page_links
 WHERE page_path = <dtml-sqlvar page_path type=string>

What I want is to be able to populate page_path using something like this (I
know it doesn't work):

                  <dtml-in exec="page_links_query(page_path=PATH_INFO)">
                    <A HREF="menu_path"><dtml-var menu_item><BR></A>
                  </dtml-in>

Anyone know how I could do this?

Thanks.
Aaron.