Hi there, 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> I know that the code above does not work. Can anyone give me clues obout how to write the with clause. With kind regards. Fredrik
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
participants (2)
-
Dieter Maurer -
Rubinstein Fredrik