Re: pass parameter in href
Fred Drake <[email protected]> Tue, 23 Aug 2005 10:08:39 -0400
| Newsgroups | gmane.comp.web.zope.page-templates |
|---|---|
| Message-ID | <[email protected]> |
On 8/23/05, [email protected] . <[email protected]> wrote: > In 2.zpt I have: > <!--tal:define="value python:context.REQUEST.get('firstValue')"--> this 'firstValue' come from 1.zpt > I want to pass this integer ' value ' into script using link in 2.zpt: > <!-- <a href="script?value=??">Indeks</a> --> > but I can't figured out what I should insert in place of this question marks > When I insert : > <!-- <a href="script?value=value">Indeks</a> --> > I receive only word ' value ' not integer value depending on what was 'firstValue'. I'm just guess that you don't really want it all in a comment. :-) Try this: <div tal:define="value request/firstValue"> <!-- Whatever else uses value can go in here too. --> <a tal:attributes="href string:script?value=${value}">Indeks</a> </div> -Fred -- Fred L. Drake, Jr. <fdrake at gmail.com> Zope Corporation