[Zope] Newbie problem with dtml-in expr.........

Geir Bækholt Hansen Geir B Hansen <geirh@funcom.com>
Thu, 4 May 2000 12:05:49 +0200


on Thursday, May 04, 2000 Tim Gildersleeve wrote :
TG> I expect that this is somewhere in the documentation, but I cant seem to
TG> find it. I appolagise if I am asking a stupid question. 
TG> I am creating a list of jobs to be done in our department, and to populate
TG> one of the html tables, I need to get a database column from a query based
TG> on a lookup table. 
TG> In other words I am trying to do something similar to: 
TG> <dtml-in expr="qryJobType(JOB_TYPE_ID='6')"> 
TG> This works ok and returns the results where the JOB_TYPE_ID=6. However the
TG> JOB_TYPE_ID needs to be retrieved from another query. I have tried: 
TG> <dtml-in expr="qryJobType(JOB_TYPE_ID='<dtml-var Type_ID-->')"> 
TG> But this doesnt work. I am assuming that the '' around the dtml-var is
TG> trying to treat this literally rather than expand it. I imagine that I have
TG> to do something to this to escape it from this action but cant seem to find
TG> out what. 
TG> IF someone could point me in the right direction, I would be very grateful. 
TG> Please email me any answers as well as posting here as I may not see a
TG> response here. 

Try something like :

<dtml-in expr="qryJobType(JOB_TYPE_ID=Type_ID)">

You cannot nest DTML inside DTML..




--
Geir Bækholt Hansen
web-developer/designer
geirh@funcom.com
http://www.funcom.com