Discovering the path and querying on it....
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.
Rustad, Aaron writes:
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? Looks good! Does it not work?
Dieter
participants (2)
-
Dieter Maurer -
Rustad, Aaron