I thought about doing something like <!--#in "_.string.split(location,'/')"--> <!--#unless sequence-end--> <!--#with sequence-item--> <!--#/with--> <!--#/unless--> <!--#var sequence-item--> <!--#/in--> But again I get bitten by the inability of DTML to edit the containing namespace. I think I asked a question about this earlier, but I don't remember getting a response. Is there no alternative to 'with'? Nothing that doesn't have to be a start and end? If there was only a way to change the outer namespace this would be easy!
---------- From: Pavlos Christoforou[SMTP:pavlos@gaaros.msrc.sunysb.edu] Sent: Friday, February 19, 1999 9:37 AM To: Shaw, Howard Cc: 'Zope@zope.org' Subject: Re: [Zope] Var includes
On Fri, 19 Feb 1999, Shaw, Howard wrote:
Using 'var' to include acquired documents is easy. How can I use 'var' to include a document in a folder in the hierarchy below me?
I have a folder 'temp_people'. Beneath this is 'uid', and beneath this 'studinfo' I need to include the contents of 'uid/studinfo' in a document in temp_people that is dynamically generated. I tried <!--#var "_[location]"--> where location is from a surrounding 'in sql method' call. I get a traceback saying:
<!-- Error type: Error value: uid/studinfo -->
Is there any reasonable way to put in my SQL table a simple reference that can be reasonably used in DTML to get to a subfolder object? I don't want to have put DTML code in the SQL table and try and get it evaluated...
I am not sure I understand what you need to do but you can call a document from down the hierarchy by simply:
<!--# with uid--> <!--# var studinfo--> <!--# /with-->
This will render the studinfo document and include it in the current document.
Pavlos
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope