Re: [Zope] Special behavior or bug?

2000-11-24 Thread Chris Gray

Make sure that the standard_html_header is a DTML Method and not a DTML
Document.  Make sure that the calling document is DTML Document and not a
DTML Method and it should work.  That way the header acquires the title of
the calling document.  If the calling document is a DTML Method, it
acquires it's title from somewhere else according to the Zope rules of
acquisition (as opposed to the Ferengi rules of acquisition ;).

Cheers,
Chris


On Fri, 24 Nov 2000, Dany Rioux wrote:

> Hi, yeah, I know, it's me again :)
> 
> I've got this snippet in the standard_html_header hoping it would
> display the title of the calling document but instead displays the
> index_html's title... Is this the normal behavior? I know yesterday it
> was working... I tried refreshing the page but it's a no go. It simply
> refuses to put the correct title. It doesn't even put the header's
> file title... (something I guessed it would do the first time I tried
> it)
> 
> Any opinion on that?
> 
> --
>   
> 
>   
> --
> 
> ---.oo0O--O0oo.
> 
> Dany RiouxUnderSoft Inc.
> Business
> www.dating-reviews.com
> [EMAIL PROTECTED]
> 
> Personal
> www.drioux.com
> [EMAIL PROTECTED]
> 
> ---.o00O---O00o.---
> 


___
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] Special behavior or bug?

2000-11-24 Thread Dany Rioux

Chris, I can't change all the other DTML Methods to DTML Docs... I
would have to have only 1 DTML Method which is unthinkable.

Now, I'm sure there's a way to force what I want to do. Either with a
REQUEST.set('[calling_document.Title]') or something real :)

Is there such a function? (I'm sorry, I'm still confused on how to
call things in Zope.)

As for the Ferengi rules of acquisition, at least, I'm pretty sure I'd
get some profits :) haha But, unfortunately, my ears are not as
erogenous as the Ferengies.  :)

Dany

> Make sure that the standard_html_header is a DTML Method
> and not a DTML
> Document.  Make sure that the calling document is DTML
> Document and not a
> DTML Method and it should work.  That way the header
> acquires the title of
> the calling document.  If the calling document is a DTML Method, it
> acquires it's title from somewhere else according to the
> Zope rules of
> acquisition (as opposed to the Ferengi rules of acquisition ;).
>
> Cheers,
> Chris
>
>
> On Fri, 24 Nov 2000, Dany Rioux wrote:
>
> > Hi, yeah, I know, it's me again :)
> >
> > I've got this snippet in the standard_html_header hoping it would
> > display the title of the calling document but instead displays the
> > index_html's title... Is this the normal behavior? I know
> yesterday it
> > was working... I tried refreshing the page but it's a no
> go. It simply
> > refuses to put the correct title. It doesn't even put the header's
> > file title... (something I guessed it would do the first
> time I tried
> > it)
> >
> > Any opinion on that?
> >
> > --
> >   
> > 
> >   
> > --


___
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] Special behavior or bug?

2000-11-24 Thread Chris Gray

Sorry, but my understanding (which certainly may be wrong, since I don't
fully grasp the ins and outs of this yet) is that the namespace starts
with the client object to which the method is bound.  The attributes (like
title) of the method never get into the namespace.  This is part of the
design of DTML Methods; they can be bound to a variety of objects while
still giving full access to the client's namespace.  This is why the trick
of calling a DTML Document's title from an embedded DTML header Method
works.  The effect you want to achieve depends on this distinction between
DTML Methods and Documents.

Another way to say this is that the distinction between DTML Documents and
Methods allows a separation of content and logic.  Put your content
(including Titles that will be significant to your visitors) in Documents
and your logic in Methods.

Cheers,
Chris

On Fri, 24 Nov 2000, Dany Rioux wrote:

> Chris, I can't change all the other DTML Methods to DTML Docs... I
> would have to have only 1 DTML Method which is unthinkable.
> 
> Now, I'm sure there's a way to force what I want to do. Either with a
> REQUEST.set('[calling_document.Title]') or something real :)
> 
> Is there such a function? (I'm sorry, I'm still confused on how to
> call things in Zope.)
> 
> As for the Ferengi rules of acquisition, at least, I'm pretty sure I'd
> get some profits :) haha But, unfortunately, my ears are not as
> erogenous as the Ferengies.  :)
> 
> Dany
> 
> > Make sure that the standard_html_header is a DTML Method
> > and not a DTML
> > Document.  Make sure that the calling document is DTML
> > Document and not a
> > DTML Method and it should work.  That way the header
> > acquires the title of
> > the calling document.  If the calling document is a DTML Method, it
> > acquires it's title from somewhere else according to the
> > Zope rules of
> > acquisition (as opposed to the Ferengi rules of acquisition ;).
> >
> > Cheers,
> > Chris
> >
> >
> > On Fri, 24 Nov 2000, Dany Rioux wrote:
> >
> > > Hi, yeah, I know, it's me again :)
> > >
> > > I've got this snippet in the standard_html_header hoping it would
> > > display the title of the calling document but instead displays the
> > > index_html's title... Is this the normal behavior? I know
> > yesterday it
> > > was working... I tried refreshing the page but it's a no
> > go. It simply
> > > refuses to put the correct title. It doesn't even put the header's
> > > file title... (something I guessed it would do the first
> > time I tried
> > > it)
> > >
> > > Any opinion on that?
> > >
> > > --
> > >   
> > > 
> > >   
> > > --
> 
> 
> ___
> 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 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] Special behavior or bug?

2000-11-24 Thread Chris Gray

Oops! I spoke way too soon.

Try  but you can't use it in a header or it will
give you the title of the header.

You can use the following code in a header:







although it is a bit indirect and fragile: it will only work if you want
the title of DTML Method 'foo' and it is in folder 'bar' and the URL you
use to get it ends '/bar/foo', but it works in a header that is somewhere
else.  You can modify objectValues to expr="bar.objectValues()" but then
it won't work in a header called by methods not in 'bar'.  Another
possible modification is expr="PARENTS[1].objectValues()".

Cheers,
Chris


On Fri, 24 Nov 2000, Chris Gray wrote:

> Sorry, but my understanding (which certainly may be wrong, since I don't
> fully grasp the ins and outs of this yet) is that the namespace starts
> with the client object to which the method is bound.  The attributes (like
> title) of the method never get into the namespace.  This is part of the
> design of DTML Methods; they can be bound to a variety of objects while
> still giving full access to the client's namespace.  This is why the trick
> of calling a DTML Document's title from an embedded DTML header Method
> works.  The effect you want to achieve depends on this distinction between
> DTML Methods and Documents.
> 
> Another way to say this is that the distinction between DTML Documents and
> Methods allows a separation of content and logic.  Put your content
> (including Titles that will be significant to your visitors) in Documents
> and your logic in Methods.
> 
> Cheers,
> Chris
> 
> On Fri, 24 Nov 2000, Dany Rioux wrote:
> 
> > Chris, I can't change all the other DTML Methods to DTML Docs... I
> > would have to have only 1 DTML Method which is unthinkable.
> > 
> > Now, I'm sure there's a way to force what I want to do. Either with a
> > REQUEST.set('[calling_document.Title]') or something real :)
> > 
> > Is there such a function? (I'm sorry, I'm still confused on how to
> > call things in Zope.)
> > 
> > As for the Ferengi rules of acquisition, at least, I'm pretty sure I'd
> > get some profits :) haha But, unfortunately, my ears are not as
> > erogenous as the Ferengies.  :)
> > 
> > Dany
> > 
> > > Make sure that the standard_html_header is a DTML Method
> > > and not a DTML
> > > Document.  Make sure that the calling document is DTML
> > > Document and not a
> > > DTML Method and it should work.  That way the header
> > > acquires the title of
> > > the calling document.  If the calling document is a DTML Method, it
> > > acquires it's title from somewhere else according to the
> > > Zope rules of
> > > acquisition (as opposed to the Ferengi rules of acquisition ;).
> > >
> > > Cheers,
> > > Chris
> > >
> > >
> > > On Fri, 24 Nov 2000, Dany Rioux wrote:
> > >
> > > > Hi, yeah, I know, it's me again :)
> > > >
> > > > I've got this snippet in the standard_html_header hoping it would
> > > > display the title of the calling document but instead displays the
> > > > index_html's title... Is this the normal behavior? I know
> > > yesterday it
> > > > was working... I tried refreshing the page but it's a no
> > > go. It simply
> > > > refuses to put the correct title. It doesn't even put the header's
> > > > file title... (something I guessed it would do the first
> > > time I tried
> > > > it)
> > > >
> > > > Any opinion on that?
> > > >
> > > > --
> > > >   
> > > > 
> > > >   
> > > > --
> > 
> > 
> > ___
> > 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 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 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] Special behavior or bug?

2000-11-25 Thread Dany Rioux

Chris,

Thanks. It did work. Only thing is I feel like trying to break eggs to
cook with a jackhammer... It works but it is daunting.

Nonetheless, I'm very glad you gave me that. I don't think I would
have been able to pull that one off by myself. Oh, maybe in a year or
so :)

I have to say that it works on subfolders. The header in is the root
and other docs are below the root (of course). At least, until now, it
gave me what I wanted.

Thanks again for your help. (I feel I'll be saying that for quite some
time! :)

Dany

> -Original Message-
> From: Chris Gray [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 24, 2000 11:50 PM
> To: Dany Rioux
> Cc: Zope Mailing List
> Subject: RE: [Zope] Special behavior or bug?
>
>
> Oops! I spoke way too soon.
>
> Try  but you can't use it in a
> header or it will
> give you the title of the header.
>
> You can use the following code in a header:
>
> 
> 
> 
> 
> 
>
> although it is a bit indirect and fragile: it will only
> work if you want
> the title of DTML Method 'foo' and it is in folder 'bar'
> and the URL you
> use to get it ends '/bar/foo', but it works in a header
> that is somewhere
> else.  You can modify objectValues to
> expr="bar.objectValues()" but then
> it won't work in a header called by methods not in 'bar'.  Another
> possible modification is expr="PARENTS[1].objectValues()".


___
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] Special behavior or bug?

2000-11-26 Thread Chris Gray

I've discovered another possible solution to your problem.  In a DTML
Method change

  

to

  

where foo is the id of a DTML Method.  Then within standard_html_header,
the variables title and id will refer to foo's id and title.

Cheers,
Chris




___
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 )