RE: [Zope] Re: ZPT rendered output formatting
Can I have any control over how ZPT formats the html it produces? Specifically, source like this:
Why do you care? A browser should not. If you want to read the output from time to time, and all else fails, use a pretty-printer like Tidy.
Grrrr. I *don't* really care, but it seems browsers and designers do. E.g. when the designers put a 1px 'spacer' image in a <td> (which btw winds me up), if TAL puts the td and img on different lines, IE formats the td as thought there is something in it.
And you seem to forget the NS 4.xx. Not widely used today but still! Until we get perfect browsers it is a good idea to have degree of control of how the HTML gets formatted.
More generally, the designers are getting annoyed that the formatting of their markup is not being preserved.
Well... It's not really the designer but the HTML coder that gets annoyed. Most of the times it is the same person... And let's face it, in the current status of affairs in browser world they have their reasons!
I wish I had the time and energy to convince people not to use dozens of tables filled with 1px images, but I don't.
Do you honestly think that html-coders/designers enjoy the "universal" 1px hack? Why convince the page designers? :-o Try the people that design the standards... And the rendering engines in browsers! Anyway, for various reasons we need some control over how we get the html formatted.
"Vizitiu, Ciprian" <CVizitiu@gbif.org> writes: Ok, I'm a bit calmer now, having realised where the actual mistake was and that it was, of course, our mistake :)
Can I have any control over how ZPT formats the html it produces? Specifically, source like this:
Why do you care? A browser should not. If you want to read the output from time to time, and all else fails, use a pretty-printer like Tidy.
Grrrr. I *don't* really care, but it seems browsers and designers do. E.g. when the designers put a 1px 'spacer' image in a <td> (which btw winds me up), if TAL puts the td and img on different lines, IE formats the td as thought there is something in it.
To be fair to ZPT, I've just realised that my statement above is not correct - it does not insert \n between elements. THe only thing it does is sometimes split up the tag itself when it has dynamic attributes, e.g. <img tal:attributes="src z/b/c" width="20" height="50"> gets rendered as <img width="20" height="50" src="http://z/b/c"> which is fine.
More generally, the designers are getting annoyed that the formatting of their markup is not being preserved.
Well... It's not really the designer but the HTML coder that gets annoyed. Most of the times it is the same person...
Yes - that's the case here.
I wish I had the time and energy to convince people not to use dozens of tables filled with 1px images, but I don't.
Do you honestly think that html-coders/designers enjoy the "universal" 1px hack? Why convince the page designers? :-o Try the people that design the standards... And the rendering engines in browsers!
I think we (my company) also need to move away from the 'must look good in back browsers' where look good means 'the same'. We're starting to get there with our html/css - i.e. coding to standards, not browsers, but there's a long way to go, not least in educating the clients.
Anyway, for various reasons we need some control over how we get the html formatted.
It would just be nice for it to be predictable at least, but I think I was just plain mistaken before, so I'm not as concerned now :) Felix.
Felix Ulrich-Oltean wrote:
To be fair to ZPT, I've just realised that my statement above is not correct - it does not insert \n between elements. THe only thing it does is sometimes split up the tag itself when it has dynamic attributes, e.g.
<img tal:attributes="src z/b/c" width="20" height="50">
gets rendered as
<img width="20" height="50" src="http://z/b/c">
which is fine.
Yes it seems that it does word wrap for the generated code. But I have never seen it do anything that changed how it was rendered in the browser. regards Max M
participants (3)
-
Felix Ulrich-Oltean -
Max M -
Vizitiu, Ciprian