having a dtml-var as arguments of a python script
Hi all, I have a quite basic question, but could not figure out how to solve it from reading the Zope documentation. I am calling a within a DTML method a sql method, which return the following variables: <dtml-var keyword> <dtml-var bd_abs> I would like to pass these arguments to a python script '*tag_entity <http://10.10.116.53:8028/limtox/tag_entity/manage_workspace>' *which is quite simple and takes two arguments: bd_abs, keyword and looks like: entity_relpaced = '<font color="red">' +keyword +'</font>' return string.replace(bd_abs, keyword, entity_relpaced) The script tries to highlight in red the <dtml-var keyword> contained in <dtml-var bd_abs> To do so I tried the following within the DTML method: <dtml-call expr="tag_entity('<dtml-var bd_abs>','<dtml-var keyword>')"> But it did not work. Could someone point me how to solve this problem or point me to any description related to this topic. Thanks, Martin **NOTA DE CONFIDENCIALIDAD** Este correo electrónico, y en su caso los ficheros adjuntos, pueden contener información protegida para el uso exclusivo de su destinatario. Se prohíbe la distribución, reproducción o cualquier otro tipo de transmisión por parte de otra persona que no sea el destinatario. Si usted recibe por error este correo, se ruega comunicarlo al remitente y borrar el mensaje recibido. **CONFIDENTIALITY NOTICE** This email communication and any attachments may contain confidential and privileged information for the sole use of the designated recipient named above. Distribution, reproduction or any other use of this transmission by any party other than the intended recipient is prohibited. If you are not the intended recipient please contact the sender and delete all copies.
--On 3. August 2007 17:15:30 +0200 Martin Krallinger <mkrallinger@cnio.es> wrote:
<dtml-call expr="tag_entity('<dtml-var bd_abs>','<dtml-var keyword>')">
Obviously this will work: <dtml-call expr="tag_entity(bd_abs,keyword)"> -aj
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Andreas Jung wrote:
--On 3. August 2007 17:15:30 +0200 Martin Krallinger <mkrallinger@cnio.es> wrote:
<dtml-call expr="tag_entity('<dtml-var bd_abs>','<dtml-var keyword>')">
Obviously this will work:
<dtml-call expr="tag_entity(bd_abs,keyword)">
You can also just do:: <dtml-call tag_entity> and set the "Namespace" binding on the "Bindings" tab of the script to '_", which would allow the script to the DTML namespace directly, e.g.:: x = _['bd_abs'] Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGs1u7+gerLs4ltQ4RAq53AJ9A2gfdLIvpK5kuk+r+zPM1ghesRACfaD/8 hzgUnttZxVnFRrJQT+UsWKs= =8dIq -----END PGP SIGNATURE-----
--On 3. August 2007 12:45:47 -0400 Tres Seaver <tseaver@palladion.com> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Andreas Jung wrote:
--On 3. August 2007 17:15:30 +0200 Martin Krallinger <mkrallinger-qoLWqpkMHMQ@public.gmane.org> wrote:
<dtml-call expr="tag_entity('<dtml-var bd_abs>','<dtml-var keyword>')">
Obviously this will work:
<dtml-call expr="tag_entity(bd_abs,keyword)">
You can also just do::
<dtml-call tag_entity>
and set the "Namespace" binding on the "Bindings" tab of the script to '_", which would allow the script to the DTML namespace directly, e.g.::
x = _['bd_abs']
Evil DTML magic...another reason why we should hide DTML from mortal Zope developers :-> Andreas
participants (3)
-
Andreas Jung -
Martin Krallinger -
Tres Seaver