[ZPT] Structural Logic: Really, It Is...

beno zope@thewebsons.com
Sun, 06 Oct 2002 12:29:01 -0400


Hi;
I'm hell-bent on dynamically structuring my Web sites such that they scale 
to the browser's resolution. This includes font size. Back when I hacked 
strictly in DTML, that was easy. I wrote an External Method and, as an 
example, called it thusly in an <img> tag:

width=<dtml-var "sizeCalc(204,size(_.None,_))">

where 204 was the width for browsers surfing at 1024*786. Obviously, if I'm 
to write page templates, it would be really convenient if I could write one 
that satisfied all (as I've done with DTML) instead of writing 5 separate 
templates! How do I create the same logic within ZPT?

For basically the same reason, I would like to include logic similar to the 
below:

<span class="frame">
  <iframe src=<span tal:replace="here/title">Title</span>_frame width=934 
height=526 frameborder=0 marginheight=0 marginwidth=0 scrolling=yes></iframe>
</span>

Of course, the problem is that I can't nest that tal:replace statement. 
What to do?
TIA,
beno