[ZPT] how to generate U.R.L.'s

Jim Gallacher jgallacher at sympatico.ca
Tue Jul 20 11:57:19 EDT 2004


karan kapur wrote:
> Hi to All..
> 
> I am currently working on a project which involves
> converting dtml
> pages to ZPT. But my problem is that when I give the a
> href command it
> open the same page again and again no matter what the
> href may be. 
> Well I am pasting the original code snippet so that a
> good samaritan
> can help me complete this project.
> 
> <a href="" tal:attributes="href
> string:${here/surl}/team_html">Team</a>
> 
> Now Team link does not open the desired page but
> instead opens up the
> page form which it had been invoked i.e. self url.
> How do i generate the desired URL's

string:${here/surl} causes the surl object to be called, but you just 
want the url itself. Try:

<a href="" tal:attributes="href 
string:${here/surl/absolute_url}/team_html">Team</a>

Jim


More information about the ZPT mailing list