[Zope] Special behavior or bug?
Dany Rioux
rdany@drioux.com
Sat, 25 Nov 2000 10:18:22 -0400
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:cpgray@library.uwaterloo.ca]
> 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 <dtml-var document_title> 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:
>
> <dtml-in objectValues>
> <dtml-if expr="_['id']==_.string.split(URL, '/')[-1]">
> <hr><dtml-var expr="this().title"><hr>
> </dtml-if>
> </dtml-in>
>
> 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()".