[Zope] My first question.
Paul Winkler
pw_lists at slinkp.com
Wed Dec 3 12:39:11 EST 2003
On Wed, Dec 03, 2003 at 10:01:08AM -0700, Goldthwaite, Joe wrote:
> My first question got lost in all the discussion of the second. I'm going
> to repost it in hopes of getting lucky.
>
>
> In order to keep my table headers consistent across reports, I have them
> stored as a separate DTML method called IS_Ptd_Header. In my main Income
> Statement, I have this where I want the table header to show up;
>
> <span tal:replace="structure here/IS_Ptd_Header"></span>
>
> This works fine. The problem I've run into is when I want to use tal tags
> in the IS_Ptd_header like this;
>
> Income Statement for period <span tal:replace="request/Per">Period</span>
>
> If I have this line in the Income Statement ZPT it works. I get the "Per"
> parameter from the URL. When the same line in IS_Ptd_Header gets ignored
> so the resulting page shows "Income Statement for period Period". I
> thought that maybe the tal tags were being ignored because IS_Ptd_Header
> is a DTML method
Correct. DTML and ZPT are completely different.
> so I created a ZPT with the name IS_YTD_Header and used
> that in the tal replace command but the result came back as HTML quoted
> text instead of the actual HTML. Anyone know what I'm missing?
Yes. Output of tal statements is normally html quoted. You probably
left out the "structure" directive:
<span tal:replace="structure here/IS_YTD_Header"></span>
> It doesn't look like ZPT is designed to work this way. For my footer,
> (for now) I just have the </table> tag to finish my table. The ZPT
> gives me a mismatched tag error.
Right. Each Page TEmplate is normally required to be valid XML.
You *can* disable this. I forget how because I never do it :-)
But it's in the zope book, first Page TEmplates chapter.
> What's the best way to modularize
> the web pages?
METAL.
See zope book, Advanced Page Templates chapter.
--
Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's SUPER-DE-DOOPER KILLJOY IZER!
(random hero from isometric.spaceninja.com)
More information about the Zope
mailing list