[Zope] Defining a Variable

Victor Subervi victorsubervi at gmail.com
Wed Jan 2 13:44:24 EST 2008


Hi;
I have this in a page template:

<html>
<body>
<table>
 <tr>
  <td tal:define="num python:here.scripts.getQuote">
   <span metal:use-macro="here/en-us/quotes/?num/macros/quote" /><br />
   <div align="center">
    <span class="text">
     <a href="quotes.pt" target="_top"><b>The quotes</b></a>
    </span>
   </div>
  </td>
 </tr>
</table>
</body>
<html>

Now, I thought that was the correct way to call the variable "num" (that is,
with the question mark: "?num"). Apparently, I'm mistaken. I've even tried
defining it this way:

  <td tal:define="num python:str(11)">
to make sure that num was properly assigned. What am I missing? Also, if I
have a dir called "scripts" in which "getQuote" exists, and "scirpts" is in
the path, shouldn't that notation work okay?
TIA,
Victor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20080102/55b9dd20/attachment.htm


More information about the Zope mailing list