[Zope] creating link to parent container.
Wed, 21 May 2003 14:15:05 +0200
* John Kipling Lewis [13:41 21/05/03 CEST]:
>On Wed, 21 May 2003, [iso-8859-1] Nicolas Évrard wrote:
>> is a link to the container of the page template. If this page template
>> is acquired as in :
>> http://.../site/animals/dog/waf/showPhoto with showPhoto a pt residing
>> in animals, this link will point to http://.../site/animals.
>> If you want to point to http://.../waf you should use
>I see the mistake I'm making now, we were looking at the index_html so m=
>URL looked like:
>When I asked for "here/absolute_url" I got the same result.
>If I'm in "http://.../site/animals/dog/waf/", how do I return:
Well this is a quick hack (I didn't test it) :
In a pythonScript (parameter origin) :
url = origin.split('/')[:-1]
and in your zpt :
<a href="#" tal:attributes="href python:upscript(here.absolute_url())">
(°> Nicolas Évrard
/ ) Liège - Belgique