[ZPT] How to pass arguments?

Wade Leftwich wleftwich@industryclick.com
Tue, 15 May 2001 14:02:21 -0400


I have a page template that calls a ZSQL method:

    <span tal:repeat="item container/myquery">
      <p>
        <span tal:content="item/customer_id"></span>
        <span tal:content="item/customer_name"></span>
      </p>
    </span>

This works fine, as long as any parameters I want to pass to the query are
present in the request object.

But what if I want to specify a customer_id parameter? This does not work:

   <span tal:repeat="item container/myquery(customer_id=42)">
      <p>
        <span tal:content="item/customer_id"></span>
        <span tal:content="item/customer_name"></span>
      </p>
    </span>

Any advice appreciated --

Wade Leftwich
Ithaca, NY