[Zope] Var includes

Shaw, Howard ShawH@STHS.org
Fri, 19 Feb 1999 10:12:38 -0600


The challenge is that I have to do this using a string returned from an
SQL query. This string must specify a multi-part reference: that is, a
directory, and a file... 

Now, I can work around this by making it more structured; that is, the
includes can only be in directory X. But I would really like to be able
to put 'uid/studinfo' in the SQL and use that... 

Do I have to write an External Function to split the directory and
perform the equivalent of nested <!--#with-->'s to include this? I had
hoped for a simple DTML based solution.

> ----------
> 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
>