[Zope] <dtml-in> tag in another <dtml-in> tag

Leo leochan@underwriting.ca
Tue, 07 May 2002 13:26:49 -0700


This is a multi-part message in MIME format.

--Boundary_(ID_A5PsiG7vFX4sy7uruwM5Ig)
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 7BIT

Hello, I have a problem to assign a variable in the dtml-in tag.

If I use the following code, I can get the expected result.

<dtml-in "test('/temp/1063')">
     <a href="description_html?file=/temp/<dtml-in Inspector_Name><dtml-var UserID></dtml-in>/<dtml-var sequence-item>"><dtml-var sequence-item><br>
</dtml-in>

However, I want to get 1063 in line 1 from <dtml-in Inspector_Name><dtml-var UserID></dtml-in>, just like line 2, I failed.
"Inspector_Name" is a ZSQL-method, to retrieve the UserID from the database by using the login name.
"test(path)" is the external method to get the actual files name and directories name in the ext2 file system of Linux.

I tried to use <dtml-in "test('/temp/<dtml-in Inspector_Name><dtml-var UserID></dtml-in>')"> instead of line 1. I failed. 

Please help. Thanks a lot. 

Leo


--Boundary_(ID_A5PsiG7vFX4sy7uruwM5Ig)
Content-type: text/html; charset=iso-8859-1
Content-transfer-encoding: 7BIT

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2715.400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hello, I have a problem to assign a variable in the 
dtml-in tag.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>If I use the following code, I can get the expected 
result.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&lt;dtml-in 
"test('/temp/1063')"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp; &lt;a 
href="description_html?file=/temp/&lt;dtml-in Inspector_Name&gt;&lt;dtml-var 
UserID&gt;&lt;/dtml-in&gt;/&lt;dtml-var sequence-item&gt;"&gt;&lt;dtml-var 
sequence-item&gt;&lt;br&gt;<BR>&lt;/dtml-in&gt;<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>However, I want to get 1063 in line 1 from 
&lt;dtml-in Inspector_Name&gt;&lt;dtml-var UserID&gt;&lt;/dtml-in&gt;, just like 
line 2, I failed.</FONT></DIV>
<DIV><FONT face=Arial size=2>"Inspector_Name" is a ZSQL-method, to retrieve the 
UserID from the database by using the login name.</FONT></DIV>
<DIV><FONT face=Arial size=2>"test(path)" is the external method to get the 
actual files name and directories name in the ext2 file system of 
Linux.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I tried to use &lt;dtml-in "test('/temp/&lt;dtml-in 
Inspector_Name&gt;&lt;dtml-var UserID&gt;&lt;/dtml-in&gt;')"&gt; instead of line 
1. I failed. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Please help. Thanks a lot. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Leo</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;</DIV></FONT></BODY></HTML>

--Boundary_(ID_A5PsiG7vFX4sy7uruwM5Ig)--