RE: [Zope] Help...zope template problem
However, I want my <a> to define the value of test because intially I need it to be equal to nothing and the <a> will define the value. But, this doesn't work because if I do this like you suggested after I close the link </a> the value of test will go right back to nothing. So, I don't know if this is possible what I am trying to do. I need conditional statements basically. So, if test <div tal:condition=test> is true it needs to perform an operation. But to perform the operation it has to be triggered by the link. Thanks -Laura -----Original Message----- From: Catherine Devlin [mailto:catherine.devlin@gmail.com] Sent: Wednesday, September 01, 2004 4:07 PM To: Laura McCord Subject: Re: [Zope] Help...zope template problem Just embed it within a tag with a larger scope. <span tal:define="test python:here.select(1)> <a href=""> PCName </a> ... your other uses for 'test' go here <span> You could put it all the way out in the <body> tag if you need to... - Catherine Devlin On Wed, 1 Sep 2004 15:46:44 -0500, Laura McCord <laura.mccord@doucet-austin.com> wrote:
if I have this:
<a href="" tal:define="test python:here.select(1)"> PCName </a>
how can I use the variable 'test' after </a>?
If it is not possible, is there another way of doing this based on a link that will give me the same functionality?
Thanks. _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
On Wed, Sep 01, 2004 at 04:13:02PM -0500, Laura McCord wrote:
However, I want my <a> to define the value of test because intially I need it to be equal to nothing
ok, i'll take your word for that, but it's not evident from the code you posted.
and the <a> will define the value. But, this doesn't work because if I do this like you suggested after I close the link </a> the value of test will go right back to nothing.
YOu can add the "global" keyword as described in teh Zope Book, in one of the two Page Templates chapters (I forget which).
So, I don't know if this is possible what I am trying to do. I need conditional statements basically. So, if test <div tal:condition=test> is true it needs to perform an operation. But to perform the operation it has to be triggered by the link.
don't really understand what you mean by "triggered by the link." Is the link itself within some conditional tag? -- Paul Winkler http://www.slinkp.com
participants (2)
-
Laura McCord -
Paul Winkler