[ZPT] Re: Lower case

Arnar Lundesgaard arnar.lundesgaard@creuna.no
Wed, 26 Jun 2002 19:46:47 +0200


"Shane Hathaway" <shane@zope.com> wrote in message
news:3D18D802.8020705@zope.com...
> Jeffrey P Shell wrote:
> > If you're using a Zope running Python 2.0 or later (ie, Zope 2.4
or later),
> > you can use string methods directly:
> >
> > <span tal:define="b python:request.somevalue.lower()">
> > <p tal:content="b">testing</p>
> > </span>
>
> ... and if we had pipes and tools, you could write (using the
modified
> syntax at the end of the proposal):
>
> <p tal:replace="request/somevalue >> tools/lower">testing</p>
>
> Shane

or if the value is already a string, simply use 'tal:define="b
request/somevalue/lower"'

try:
   <span tal:define="strng string:UPPERCASE"
tal:replace="strng/lower"/>

looks much better IMHO, and also works with upper and capitalize

  -- Arnar