[ZDP] BackTalk to Document The Zope Book (2.5 Edition)/Using Zope Page Templates

nobody@nowhere.com nobody@nowhere.com
Wed, 21 Aug 2002 11:24:08 -0400

A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx#2-50


    Notice that we've replaced the 'tal:content' attribute on the
    table cell with a tal:replace statement on a 'span' tag. This
    change allows you to have both an image and text in the table

      % Anonymous User - Aug. 19, 2002 11:36 am:
       What would happen if one didn't use the tal:replace statement on the span tag but still the tal:content
       What kind of effect would you see or if you don't see any effect at all - why would it be so?

      % Anonymous User - Aug. 21, 2002 11:24 am:
       You will see no difference when you see the result in a browser, but that's because the <span> tag has no
       visual representation. It's used as a placeholder for attributes, styles and other things.
       Example. The following template:
          <p>Title: <span tal:replace="template/title">dummy title</span></p>
       will be processed as:
          <p>Title: The Real Title</p>

       But the following other template:
          <p>Title: <span tal:content="template/title">dummy title</span></p>
       will be processed as:
          <p>Title: <span>The Real Title<span></p>

       The visual presentation to the final user in their browser is the same.