[Zope] Help...zope template problem

Eugene el-spam at yandex.ru
Thu Sep 2 02:12:54 EDT 2004


Hello, Laura.

You wrote 2 сентября 2004 г., 0:46:44:

> if I have this:

> <a href="" tal:define="test python:here.select(1)">
>  PCName
> </a>

> how can I use the variable 'test' after </a>?
Here variable 'test' is local variable - it' visible in the block
where it's defined only.

There're 2 ways to do that you want
1) define it as global variable tal:define="global
test:here.select(1)"
it's not very good way

2) wrap this a-tag with some tag and define variable in it, for
example:

<tal:var tal:define="test python:here.select(1)">
  <a>
  PCName
 </a>

 <span tal:content="test">
  PC Cost
 </span>
</tal:var>

> If it is not possible, is there another way of doing this based on a
> link that will give me the same functionality?
Didn't understand you well.....

-- 
Yours,
 Eugene                          mailto:el-spam at yandex.ru



More information about the Zope mailing list