[Zope] How to include a parameter with Tal Attributes?

zope zope@stylusinc.net
Tue, 30 Jul 2002 10:57:38 +0530


> Hi
> Thanks for the help i tried out the suggestion u have given i am getting
an
> error .Could you hepl me out?
> <table tal:define="results  list_clients;
>                     start request/start|python:0;
>                     batch python:modules['ZTUtils'].Batch(results,
>                                                           size=5,
>                                                           start=start)">
>        <div tal:repeat="result batch" >
> <td><a href="zpt" tal:attributes="href
> python:zpt_delclient(txtId=result['id'],haction='del')">Delete</a></td>
> I get an  error  :
> Error Type: TALESError
> Error Value: exceptions.KeyError on txtId in "",
>
> And if I try to call a PG Template  like this:
> <td><a href="zpt" tal:attributes="href
> zpt_delclient?txtId='result/id',haction='del'">Delete</a></td>
> I get an error:
> Compilation failed
> TAL.TALDefs.TALError: Invalid variable name
> "zpt_delclient?txtId=result['id']&haction='del'" in expression
> "zpt_delclient?txtId=result['id']&haction='del'"
> Please tell me how i can solve this problem?
> i tried almost all sorts of different combinations
> But I still get an error
> Reagards
> John Kunchandy
>
> ----- Original Message -----
> From: "Dmitry Matveev" <matveev@uralfirm.ru>
> To: <zope@zope.org>
> Sent: Monday, July 29, 2002 6:10 PM
> Subject: Re: [Zope] How to include a parameter with ZTUtils?
>
>
> > Hello zope,
> >
> >                                                       start=start)">
> > z> <div tal:repeat="result batch" >
> > z> <tr>
> > z> <td><a href="zpt" tal:attributes="href
> > z> zpt_delclient?id=result/id">Delete</a></td>
> > z> </tr>
> > z> </table>
> >
> > It helps you
> > <a href="zpt" tal:attributes="href pyton:'zpt_delclient?id=' +
> > result['id']">Delete</a>
> >
> >
> > --
> > Best regards,                          www.uralfirm.ru
> > Dmitry Matveev                         mailto:matveev@uralfirm.ru
> >
> >
> > _______________________________________________
> > Zope maillist  -  Zope@zope.org
> > http://lists.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope-dev )
> >
> >
>