[Zope] Arg! How format a link from a DB?

Bradley McLean brad@bradm.ne.mediaone.net
Sun, 21 Nov 1999 23:07:26 -0500


I've been butting my head against what must be a simple
problem:

I've got a bunch of data in some sql tables.  I'd
like to be able to define a DTML Method that formats
up a link tag based on an incoming record id.

I then want to include this method in another one.

So:

----- Calling dtml method:
<dtml-var "buildHotlinkFor(ID=5)">

----- buildHotlinkFor dtml method:

<dtml-in "AnotherFolder.lookupSQLMethod(ID)">
<a href="displayRecord?ID=<dtml-var expr=ID>">
  <dtml-var fieldInTheRecord></a>
</dtml-in>

-----
(SQL method omitted, but proven to work).

I'm clearly missing some subtleties in how to pass /
call.  I can get the buildHotLinkFor dtml Method to
work just fine if I enter a test URL to it, but when
I try to call it from another method in another folder,
I can't seem to make it happy.  It will refuse to find
the SQL method, or if I monkey around with various
other parameters (like passing REQUEST, or AnotherFolder
to it), it gets closer to working.

Help!  TIA  -Brad