[Zope] dtml question- testing folder existence in url

Chris Withers chrisw@nipltd.com
Thu, 29 Aug 2002 11:27:48 +0100


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