[Zope] URL param string problem

Casey Duncan casey@zope.com
Wed, 27 Mar 2002 15:13:31 -0700


If you mean you want to redirect the browser to the new generated URL, 
do something like:

<dtml-let new_url="old_url.replace('CA', imageName)">
    <dtml-call expr="redirect(new_url)">
</dtml-let>

This would be much more readable as a python script, however.

-Casey

Mark A. Lilly wrote:
> Hi All,
> 
> I have a DTML method which needs to concat a URL.
> 
> We have:
> 
> <dtml-with
> expr="web_client('http://192.168.1.1/tinorb/pieex2.php?imageName=CA')">
>   <dtml-var body>
> </dtml-with>
> 
> There is a variable &dtml-theImageName; which needs to replace the CA in the
> above code with the value of &dtml-theImageName; (which is equal to OH).
> 
> I tried doing something like
> <dtml-let
> theURL="_['http://192.168.1.1/tinorb/pieex2.php?imageName='+theImageName]">
> 
> But i get the following key error, which has the exact URL i want to pass to
> web_client (see above) but it's not working.  Any thoughts??
> 
> Error Type: KeyError
> Error Value: http://192.168.1.1/tinorb/pieex2.php?imageName=OH
> 
> Thanks,
> m