[Zope3-dev] Re: Apache rewrite rules and URLs: an experiment

Jim Fulton jim at zope.com
Wed Nov 3 08:56:47 EST 2004


Peter Mayne wrote:
> Jim Fulton wrote:
> 
>> Peter Mayne wrote:
>>
>>> What if the path doesn't involve a resource, such as a link to the 
>>> home page or a site map page?
>>
>>
>> If you always want to link to a page of the site, then get the current 
>> site
>> and construct a url relative to the site's url. Perhaps we'll want
>> apis to make this easier. <shrug/>  For now, on the trunk, you can
>> use zope.app.zapi.getSite() to get the site. (On the branch, you hace
>> to use zope.app.component.hooks.getSite().)
> 
> 
> Sorry, you've lost me. I'm using zope.app.component.hooks.getSite() 
> (rc3), which returns the root Folder whether I go direct to Zope or via 
> Apache. In fact, it's the same Folder object. Where am I supposed to go 
> from here?

You can then use the absolute url view to get its url. You can then
generate site-relative urls from that.

Jim

-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org


More information about the Zope3-dev mailing list