[Zope] Simple question (again)
Michel Pelletier
michel@digicool.com
Tue, 24 Aug 1999 14:13:24 -0400
> -----Original Message-----
> From: Arnaud Lecat [mailto:lecat@hexanet.fr]
> Sent: Tuesday, August 24, 1999 1:50 PM
> To: Michael Bernstein
> Cc: ZOPE
> Subject: Re: [Zope] Simple question (again)
>
>
> Niet :) Because i'm in a Folder so I get the id of the folder
> not the id
> of the
> document !!!
>
You mean method right? <dtml-var id> in a method will give you the id
of the folder, <dtml-var id> in a document will give you the id of the
document.
> I think I must do an objectValue or something like that before. What I
> want
> to do is to compare the id of the current document with a list of
> document
> to see if it's in it :)
>
You mean methods right? ;) To get the id of a method, try:
<dtml-var document_id>
Okay, Okay, I *know* this looks really dumb. Why is the id of a
*method* called *document_id*??? Because before Zope 1.10, there were
no documents, just methods (and they were called documents) and there
was a valid need to get the id of the method (document). So we gave
methods (documents) the ability to reflect a little information about
themselves into themselves.
It was a hack.
So right now, I would suggest you look at the design of your little app,
and make sure that maybe what you really want are documents, and not
methods. Any time you want a DTML object to reflect on itself, you're
talking about the need for a DTML Document, and not a Method.
I will append this information to my DTML Document/Method HowTo.
http://www.zope.org:18200/Members/michel/DTMLDocsandMeths
-Michel
> Michael Bernstein wrote:
>
> > Arnaud Lecat wrote:
> > >
> > > How to get the title and id of the current document ???
> > >
> >
> > <untested>
> >
> > <!--#var id--> <!--#var title_or_id-->
> >
> > Or alternatively:
> >
> > <dtml-var id> <dtml-var title_or_id>
> >
> > </untested> :^)
> >
> > HTH,
> >
> > Michael Bernstein.
>
> --
> >> WinErr: 080 Clavier introuvable - Veuillez appuyer
> sur n'importe quelle touche pour continuer. <<
>
>
> Arnaud LECAT >> Email: lecat@hexanet.fr >> WWW
> page:www.hexanet.fr/~lecat
>
> HEXANET >> http://www.hexanet.fr
>
> Z.A. Farman sud - 9 rue Roland Coffignot
> BP 415 - 51689 Reims Cedex 2 - France
> phone: (33) 03 26 79 30 05 Fax: (33) 03 26 79 30 06
>
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
>
> (To receive general Zope announcements, see:
> http://www.zope.org/mailman/listinfo/zope-announce
>
> For developer-specific issues, zope-dev@zope.org -
> http://www.zope.org/mailman/listinfo/zope-dev )
>