[Zope-dev] [IDEA] ZopeRoot and SiteRoot

sean.upton@uniontrib.com sean.upton@uniontrib.com
Mon, 17 Dec 2001 10:32:37 -0800


As it stands, though, I think you need to: use getPhysicalPath(), and
iterate overs the construction of a temporary path list object, using pop()
to remove a folder from the list until using restrictedTraverse() with a
conditional test of folder content finds a VHM or similar object that
indicates you are in the virtual site root.  Not a big deal, but it is
around a dozen lines of code in a TTW python script to do this.  Either
that, or in theory (if using VHM), you could get the namespace of your VHM
via acquisition, and just return its aq_parent...

Sean

-----Original Message-----
From: Chris McDonough [mailto:chrism@zope.com]
Sent: Monday, December 17, 2001 10:27 AM
To: Casey Duncan; Lennart Regebro; zope-dev@zope.org
Subject: Re: [Zope-dev] [IDEA] ZopeRoot and SiteRoot


Hmm... no, I dont think there's a call to get the virtual root.
Although I imagine it would be pretty simple to add.

----- Original Message -----
From: "Casey Duncan" <c.duncan@nlada.org>
To: "Chris McDonough" <chrism@zope.com>; "Lennart Regebro"
<lennart@regebro.nu>; <zope-dev@zope.org>
Sent: Monday, December 17, 2001 12:45 PM
Subject: Re: [Zope-dev] [IDEA] ZopeRoot and SiteRoot


> On Monday 17 December 2001 12:20 pm, Chris McDonough allegedly
wrote:
> > getPhysicalRoot already exists, and returns the top-level app
object
> > when called from any Zope object.
>
> You know I had a sneaking suspicion that this existed somewhere,
which is why
> I didn't go ahead and fishify it. Thanks for pointing that out.
>
> Is there a comparable all to get the site root?
>
> /---------------------------------------------------\
>   Casey Duncan, Sr. Web Developer
>   National Legal Aid and Defender Association
>   c.duncan@nlada.org
> \---------------------------------------------------/
>
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
>


_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )