Try a little trick I use with _.string.split().  split() splits a string into two (or 
more) parts based on a delimiter.  In this case, the delimiter could be any part of 
the URL directly to the left of /Zorba/busca/...

For example:
<dtml-var "_.string.split(url, ':8080')[1]">

This splits the URL into '' (which you don't want) and 
'/Zorba/busca/Zorba/...' (which you do want).  The [1] tells Zope to take only the 
second part, the part you want.

If you plan to make this code portable incase you switch servers or use a SiteRoot, I 
believe (and correct me if I'm wrong) you're safer using the 'BASE0' property for your 
delimiter.  For example:

<dtml-var "_.string.split(url, BASE0)[1]">

Now, I don't know about the organizational problems that prevent you from dropping the 
/Zorba/busca, but I'd assume you would do the same thing, except replace "BASE0" with 
"BASE0 '/Zorba/busca'".  I'm thinking, though, you'll eventually want to set up a 
separate server and a SiteRoot so that your web address will be -- right?

- T.J.

<<< "Walter A. Aprile" <[EMAIL PROTECTED]>  6/30 11:19p >>>

        more newbie questions, I am afraid. I have a ZCatalog result form
that boringly forms links this way:

<dtml-var "busca.getpath(data_record_id_)">

        Due to the way my site is organized, the URL I get has an unwanted
part at the beginning. The part is always the same size, and the same string
in fact. How do I remove it ? For example, the URL is
and I would like to cut it here     |
and turn it into 


        The problem is that the URL above is still valid, but if I do another
search then the same /Zorba/busca gets added, and it gets longer and longer,
besides messing up my breadcrumb trail.

        I tried using a regular expression method, but I do not really know
Python (not yet !), so it did not work. 

        Thank you very much

-- Vita brevis, ars longa, occasio celeris, experimentum periculosum,
judicium difficile. Attention: Un train peut en cacher un autre
-><- Eris aprueba este email ! -><-

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - )

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to