[ZPT] Re: [Zope-Annce] TAL Hotfix 2004-07-14 for Zope 2.7.0, 2.7.1

Fred Drake fdrake at gmail.com
Thu Jul 22 11:35:05 EDT 2004


On Thu, 22 Jul 2004 10:16:42 +0100, Chris Withers
<chris at simplistix.co.uk> wrote:
> What's the "text" keyword?

The opposite of "structure"; using it means to encode the characters
as text.  This is the default, so you don't normally need to use it
explicitly.

> > Then use the "structure" keyword as you normally would; that works just fine.
> 
> Can you give me an example? I don't follow...

Sure:

  <span i18n:translate="">
    The result looks like:
    <span i18n:name="display" tal:replace="structure
get/some/html"><b>this</b></span>
  </span>

Could result in something like this:

  <span>
    This is not English
    <em>This is <b>get/some/html</b>.</em>
  </span>

Note that the replacement for ${display} is not encoded as text; it
contains the HTML markup returned by get/some/html.


  -Fred

-- 
Fred L. Drake, Jr.    <fdrake at gmail.com>
Zope Corporation


More information about the ZPT mailing list