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

schoppa@uni-bielefeld.de schoppa@uni-bielefeld.de
Wed, 09 May 2001 14:15:46 +0200 (CEST)


Hi Chris,

sorry. Your are right. Didn't work because of dmtl instead of dtml ;-)

Bye
Marcus

Zitiere Chris McDonough <chrism@digicool.com>:

> Hi Marcus,
> 
> <dmtl-let firstseven="urlvar[0:7]">
>   <dtml-var firstseven>
> </dtml-let>
> 
> 
> schoppa@uni-bielefeld.de wrote:
> > 
> > Hi there,
> > 
> > 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://'">
> > 
> > The problem is the ':'. May be one have to use url_quote. But can't
> combine
> > dtml-let drml-call with url-quote to create a new var.
> > 
> > Thank you
> > Marcus
> > 
> > _______________________________________________
> > Zope maillist  -  Zope@zope.org
> > http://lists.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope-dev )
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>