I am trying to use a to check whether the url is in a certain path. Been playing around with this for a few hours now and am hoping someone knows how to accomplish it.
Let's say you have a folder structure of:
what I want to do is check if I am only in secure OR if I am in secure/docs (and anything underneath docs, i.e. secure/docs/blah/blah) OR if I am in secure/foo (and anything underneath foo, i.e. secure/foo/blah/blah)
Doing a <dtml-if "not secure"> doesn't work because everything is traversed back to the root folder of secure. Using restrictedTraverse doesn't do anything because it's simply checking if what you are traversing to exists.
Just need that dtml-if statement so I can show or not show a piece of code based on where the user is browsing. Think of a navbar where you don't want to show a link to where you already are. That's the idea.