[Zope] "evaluating" a REQUEST Parameter to be passed to a dtml-var
Julián Muñoz Domínguez
jmunoz@softhome.net
Tue, 16 Oct 2001 22:38:04 +0000 (GMT)
use
getattr(container,main_english)
in yout python script
<dtml-var expr="_.getitem(main_english)">
in dtml
On Tue, 16 Oct 2001, Doyon, Jean-Francois wrote:
> Hello,
>
> Sorry, but I'm new at this :)
>
> The problem is simple, I want to call a dtml-var using a name (object)
> provided by the URL
>
> So for instance if the url is:
>
> http://host/cmf?document=main_english
>
> I want <dtml-var main_english fmt="structured-text"> to work properly.
>
> Of course the problem I'm having right now is that the parameter value is
> being passed as a string instead of being eval'ed ... So instead of the
> contents of "main_english" I get the STRING "main_english"!
>
> Unfortunately (Although for good reason) python's "eval" is not available
> ...
>
> So how do I do it?
>
> Thanks!
>
> Jean-François Doyon
> Internet Service Development and Systems Support
> GeoAccess Division
> Canadian Center for Remote Sensing
> Natural Resources Canada
> http://atlas.gc.ca
> Phone: (613) 992-4902
> Fax: (613) 947-2410
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>
--
__o
_ \<_
(_)/(_)
Saludos de Julián
EA4ACL
-.-