[Zope] Re: DTML-WITH

Dieter Maurer dieter@handshake.de
Tue, 13 Feb 2001 20:32:10 +0100 (CET)


Rubinstein Fredrik writes:
 > 	I have built an class and added entries in that class.
 > 
 > 	Now I want to use a list of that class in an other location in my
 > Zope application.
 > 	However I can not get the dtml-with tag to work. 
 > 
 > <TR><TH>Project</TH> 
 >   <TD><SELECT name="projekt">
 >       <DTML-WITH "http://localhost:8080/Jan_proj/Projekt/Projekten">
 >       <DTML-IN "objectValues(['projekt Add'])">      
 >         <OPTION value='<dtml-var projekt_id>'><dtml-var projekt_id></option>
 >       </DTML-IN>
 >       </DTML-WITH>
 >     </SELECT>
 > </TD>
 > </TR>
"dtml-with" wants an object, not an URL.

If you use Zope 2.3, you can try "restricted_traverse" to
map the URL into an object (may work already for Zope 2.2).
Otherwise, you can try "resolve_url".
This is a REQUEST method.

The Zope API reference has documentation for both methods.



Dieter