[Zope] DTML title

Phil Harris phil.harris@zope.co.uk
Mon, 12 Mar 2001 11:34:46 -0000


Depending on the exact syntax of your path you could try something like (not
exactly tested):

if path looks like http://hostname/page/to/get/title/for:
<dtml-var
"restrictedTraverse(_.string.split(thepath,BASE0)[1])['title_or_id'])">

if path looks like /page/to/get/title/for
<dtml-var "restrictedTraverse(thepath)['title_or_id'])">

try various combinations, but basicaly restrictedTraverse is what you need
to use.

hth

Phil



----- Original Message -----
From: "nuno" <nuno@fccn.pt>
To: <zope@zope.org>
Sent: Monday, March 12, 2001 11:21 AM
Subject: [Zope] DTML title


> Hi all !
> I'm trying to access the title of an DTML Document !
> The problem is that i only have the path!
>
> Does someone knows how to access the title of an DTML Document  having
only
> it's path?
>
> thank you all
>
> regards,
> Nuno
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> 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 )