[Zope-dev] closed collector issues 1252 and 1308
Simon Eisenmann
simon at struktur.de
Tue Aug 24 03:24:29 EDT 2004
Chris Withers wrote:
> Since these are both confused, long standing feature requests, what I'd
> recommend instead is writing a mail to this list explaining exactly what
> the problem is that you're having, the changes you would like made, and
> why you'd likee them made. You could even give it a nice descriptive
> subject line :-)
>
> I suspect there's a solution that doesn't involve any changes to Zope
> lurking there since this funcionality, as best I can understand it,
> seems to be extremely rarely requested.
The only reason i had for writing this crap code listed in issue #1252
was the requirement to generate urls inside zope which are exactly the
same as the url the user entered into the browser. VIRTUAL_URL does this
as required, but absolute_url or all other builtin zope methods i am
aware of do not. Only thing which is required _no matter of what
conditions_ is a anytime available method/request attribute which holds
the url the user actually entered and works in both virtualhosting and
non virtualhosting conditions. Right now the only way to do this is
something like this:
<a tal:define="url
request/VIRTUAL_URL|string:${request/SERVER_URL}${request/PATH_TRANSLATED}"
tal:attributes="href string:${url}#someContent"></a>
So having VIRTUAL_URL anytime available would help alot.
Cheers,
Simon
More information about the Zope-Dev
mailing list