[ZPT] Lower case

Tino Wildenhain tino@wildenhain.de
Wed, 26 Jun 2002 20:45:28 +0200


Hi,

It seems you want to show the content in lowercase.
The preferred way is of course using stylesheets here.
(ZPT is very happy with stylesheets)

<p tal:content="request/somevalue" 
style="text-transform:lowercase">somevalue</p>


If you want to do something not trivial with values in ZPT,
you should consider using python scripts to prepare them beforehand
or use them as callback hooks instead of the raw values.

Regards
Tino


--On Tuesday, June 25, 2002 11:37:23 -0700 Colin Fox <cfox@cfconsulting.ca> 
wrote:

> Hi everyone.
>
> I need to be able to force the contents of a variable into lower case,
> and I can't find any docs on how to do this.
>
> Here's a simple template showing an example of what I'm trying to do:
>
>
> <html>
>   <head>
>     <title tal:content="template/title">The title</title>
>   </head>
>   <body>
>
>     <span tal:define="b python:string.lower(${request/somevalue})">
>     <p tal:content="string:${b}">testing</p>
>     </span>
>
>   </body>
> </html>
>
>
> Any suggestions?
>
> Thanks!
>   Colin
>
>
> --
> Colin Fox                                         cfox@cfconsulting.ca
> CF Consulting Inc.                                    GPG Fingerprint:
>                     D8F0 84E7 E7CC 5C6C 9982  F1A7 A3EB 6EA3 BC97 572F