[Zope] Var includes
Pavlos Christoforou
pavlos@gaaros.msrc.sunysb.edu
Fri, 19 Feb 1999 11:39:56 -0500 (EST)
On Fri, 19 Feb 1999, Shaw, Howard wrote:
> 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...
> 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.
Ok now I understand the problem. It can be done with or without external
methods by using _.string.replace and _.string.split methods. Neverhteless
I have a feeling that the whole thing can be done in a more Zopinic way.
Now whenever I come to a point that I have to use some ugly expression to
get things done, I would reexamine my design to find where I introduced
Non-Zopinic elements.
For starters couldn't you redirect the client to the appropriate page?
Lets suppose your query returns a variable mypath which contains the
string:
"gid/uid/studinfo"
you could do
<!--# call "RESPONSE.redirect(path)"-->