[Zope] stupid question: first 7 chars of an URL

Thomas B. Passin tpassin@mitretek.org
Wed, 9 May 2001 10:33:42 -0400


[<schoppa@uni-bielefeld.de>]
can't figure out how to write the frist 7 characters of an URL string to a
new
var.

<dtml-var urlvar[0:4]> works fine.
<dtml-var urlvar[0:7]> doesn't work.

<dtml-if "urlvar[0:7] == 'http://'">

[Tom]
The expression urlvar[0:7] is correct, but you can't assign it to a variable
or display it with a dtml-if instruction.  You could display it with
<dtml-var "urlvar[0:7]">.

For how to assign it to a new variable, there are several ways, including
REQUEST.set and dtml-let.  You have to read up on how to do it to suit what
you want to do.

Tom P