[Zope] dtml question- testing folder existence in url

Kelley, Sean SKelley@ci.santa-rosa.ca.us
Thu, 29 Aug 2002 11:59:41 -0700


Thanks! This works great ...guess I need to get a python book after I get a
better handle in DTML and ZPT 

> -----Original Message-----
> From: Chris Withers [mailto:chrisw@nipltd.com]
> Sent: Thursday, August 29, 2002 3:28 AM
> To: Kelley, Sean
> Cc: 'zope@zope.org'
> Subject: Re: [Zope] dtml question- testing folder existence in url
> 
> 
> Kelley, Sean wrote:
> > Hi,
> > I want to provide custom content (especially in CMF) 
> depending on whether
> > someone is in a particular folder or not.  If I am in the 
> proverbial widget
> > folder I want to display only widget news and files.  How 
> does one test to
> > see if the folder=widgets is in the url using DTML? Would 
> it be best to test
> > by full url or folder in path- i.e.- http://domain.com/widgets or
> > ../widgets/.. somewhere.
> 
> This sounds like it should be in a python script ;-)
> 
> but:
> 
> <dtml-if "'widgets' in REQUEST.steps">
> I really should stop using DTML but 'widgets' is in the URL...
> </dtml-if>
> 
> cheers,
> 
> Chris
>