Kenneth Gonsalves wrote:
hi,
i have a postgres table like so:
id integer
name varchar
i want to list the contents of the table and build an href like this:
<a href="foo.bar.com/edit?id=someid">name</a>
my zpt code so far is:
<a tal:attributes="href string:${portal_url}/editdemo?="
tal:content="result/name">name</a>
but i cant figure out how to insert the tal:contern="result/id" after
the '?='
any clues?
Just use the path-expression result/id in "string:":
<a tal:attributes="href string:${portal_url}/editdemo?id=${result/id}"
tal:content="result/name">name</a>
See: http://www.plope.com/Books/2_7Edition/AdvZPT.stx#2-12
HTH,
Wolfram
_______________________________________________
ZPT mailing list
[email protected]
http://mail.zope.org/mailman/listinfo/zpt