[Zope] Embedding absolute_url in TAL Syntax

Chris Withers chrisw@nipltd.com
Fri, 07 Jun 2002 12:21:09 +0100


Dan Shafer wrote:
> 
> OK, now that I have my table of objects produced by a Python script working
> in ZPT, I need to figure out how to connect an entry in the table to its
> URL. What is the TAL equivalent of:
> 
> <td><a href="<dtml-var absolute_url>"><dtml-var title></a></td>
> 
> It *seemed* like I should be able to code:
> 
> <td><a
> href="tal:content='item/absolute_url'"><tal:content="item/title"></a></td>

Ick! This is _all_ wrong ;-)

You want:

<td><a href="dummy" tal:attributes="href item/absolute_url"
                    tal:content="item/title">Dummy Title</a></td>

In addition:

<tal:content="item/title">

...is very wrong ;-)

If you want to do it like that, you need:

<tal:x replace="item/title" />

cheers,

Chris