[Zope] How to get PARENTS[-1] from within a Python Product

2000-08-26 Thread Ira Hochman

Hello-

How does one retrieve the equivalent of PARENTS[-1] from within a Python
Product in Zope?

I have tried self.aq_parent.absolute_url() which gets the equivalent
of PARENTS[0], but I need to get PARENTS[-1].

I am trying to isolate/preserve the portion of the path that contains
cgi/pcgi info, if any (as in "http://yoursite.com/bin-cgi/Zope.pcgi").
 Alternate approaches to accomplish the same would also be welcome.

-- 
Ira Hochman
[EMAIL PROTECTED] - email
(617) 598-1014 x5511 - voicemail/fax



__
FREE voicemail, email, and fax...all in one place.
Sign Up Now! http://www.onebox.com


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] How to get PARENTS[-1] from within a Python Product

2000-08-29 Thread Ira Hochman

Thanks!

It turns out the expression is 

self.REQUEST.PARENTS[-1].absolute_url()


I'll see if I can put this into a useful tip.

-- 
Ira Hochman
[EMAIL PROTECTED] - email
(617) 598-1014 x5511 - voicemail/fax



 Dieter Maurer <[EMAIL PROTECTED]> wrote:
> Ira Hochman writes:
>  > How does one retrieve the equivalent of PARENTS[-1] from within
> a Python
>  > Product in Zope?
> ZPublisher places "REQUEST" at the top of the acquisition chain.
> "PARENTS" is an attribute of "REQUEST".
> 
> Therefore, you should be able to simple use "self.PARENTS[-1]".
> 
> If it does not, try "self.REQUEST.PARENTS[-1]".
> 
> 
> 
> Dieter
> 

__
FREE voicemail, email, and fax...all in one place.
Sign Up Now! http://www.onebox.com


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Zope 2.2 & ZopeAttributionButton

2000-09-05 Thread Ira Hochman

Hello

Does anyone know how to set security on ZopeAttributionButton?  

Since it is referenced (currently) in my standard_html_footer, users
who have only access to their subdirectory get an error on pages that
reference this footer.

I'd rather set it up properly than remove the credits.

TIA!
--ira

-- 
Ira Hochman
[EMAIL PROTECTED] - email


__
FREE voicemail, email, and fax...all in one place.
Sign Up Now! http://www.onebox.com


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )