[Zope] Re[2]: [Zope] URL Recognition

Geir Bækholt Geir Bækholt <geirh@funcom.com>
Tue, 16 May 2000 10:05:08 +0200


on Monday, May 15, 2000 Tom Scheidt wrote :
TS> Thanks Geir.

TS> I realized I mad a mistake though, what I actually need is:

TS> <dtml-if (this page is in the /page folder)> do something </dtml-if>

ahh.. worked a bit on this one myself, to highlight selections in
a menu.

for a hard-coded version, use something like:
<dtml-if "PATH_INFO[:4] == '/page'">
do stuff
</dtml-if>

meaning : if the first 5 letters of PATH_INFO equals
'/page', do stuff...

to make it dynamic, and fit for different urls, make it look
like :

<dtml-if "PATH_INFO[:(_.len(variableContainingTheUrl))] == variableContainingTheUrl">
do stuff
</dtml-if>

if '/page' is a variable "variableContainingTheUrl"


good luck

--
Geir Bækholt
web-developer/designer
geirh@funcom.com
http://www.funcom.com