[ZPT] how can I avoid path to grow huge ??

Robert Rottermann robert@redcor.ch
Wed, 1 May 2002 04:47:41 +0200


Thanks dieter,
As you can see, I am using only relative paths.
        <a href="scripts/showGardenPage?roomnr=gd"
           tal:content="structure python:here.scripts.worte('selection',
'gd')">
          Garten-Dekoration
        </a>
each use of the link adds a /scripts to the path.
changing it to (adding tall:attributes):
        <a href="scripts/showGardenPage?roomnr=gd"
           tal:attributes="href python:'%s/showGardenPage?roomnr=gd' %
here.scripts.absolute_url()"
           tal:content="structure python:here.scripts.worte('selection',
'gd')">
          Garten-Dekoration
        </a>
works but seems convoluted and I fail to understand why it is neccessary.
Robert
----- Original Message -----
From: "Dieter Maurer" <dieter@handshake.de>
To: "Robert Rottermann" <robert@redcor.ch>
Cc: <zpt@zope.org>
Sent: Tuesday, April 30, 2002 9:56 PM
Subject: Re: [ZPT] how can I avoid path to grow huge ??


> Robert Rottermann writes:
>  > I  have a script which creates a dynamic links according to the folder
>  > content.
>  > This script is called from a page template with
>  > <span tal:content="structure here/scripts/xxx"></span>
>  > this works fine. Unfortunatelly with each click on a such a link the
url
>  > gets longer. (scripts/xxx is added to it)
> If your "xxx" contains simple relative links (without any "/"),
> then this should not happen.
>
> Depending on your site structure, you may be able to use
> "absolute_url". It should flatten out your URLs.
>
>
> Dieter
>
>
> _______________________________________________
> ZPT mailing list
> ZPT@zope.org
> http://lists.zope.org/mailman/listinfo/zpt
>