Hi! Paul Winkler wrote:
absolute_url
- containment only, does not include contextual elements from the client's URL, that's the whole point of this method :-)
absolute_url(relative=1) - same as absolute_url, and not usable in some VHM situations.
absolute_url_path - is usable with VHM, but still containment only.
virtual_url_path - is usable with VHM, but still containment only.
getPhysicalPath - containment only, not compatible with VHM at all and should NEVER be used for URLs.
getPhysicalRoot - returns the zope app root, not relevant to this discussion.
request/URLx - close, but no cigar: leaves out traverse_subpath elements.
request/VIRTUAL_URL - includes context and traverse_subpath elements, but doesn't work if a VHM is not present or is not triggered.
Thanks for that nice overview! Just one additional remark: Besides using traverse_subpath, there is an other reason why request/URLx can get out of sync with the URL requested by the browser: The path might be changed on traversal, using __before_publishing_traverse__ or __browser_default__ hooks. Cheers, Yuppie