[Zope] Zope page templates and query strings

Tim Hicks tim@sitefusion.co.uk
Mon, 16 Sep 2002 23:23:18 +0100


Stuart Robinson wrote:
> Any advice on the following problem accepted with thanks: 
> 
> I'm generating a list of data items in a zope page template.The data
> comes from an ZSQL method and successfully generates a list of items in
> the database
> 
> however I have Compilation failures if I try the following:
> 
> <a href="delete?isbn=<span
> tal:replace="list/isbn">"isbn"</span>">delete</a>
> 
> the error returned is " TAL.HTMLParser.HTMLParseError: EOF in middle of
> construct,"
> 
> What I'm trying to do is construct a query string thus (where isbn is
> '1234567890'):
> 
> <a href="delete?isbn=1234567890>delete</a>

How's about something like:

<a href="#" tal:attributes="href python:'delete?isbn?=%s' % 
list.isbn">delete</a>

Untested, and may not be quite right...

tim