[ZPT] Sanity Patch

Casey Duncan casey_duncan@yahoo.com
Tue, 12 Mar 2002 09:07:22 -0800 (PST)


Oh yeah I forgot the real reason it didn't work good
with macro expansion turned off:

I had a global style sheet which was referenced in
standard_template.pt. With expansion turned off
nothing looked right. Granted in DW you can manually
attach a stylesheet, but previewing the page locally
was still a problem if I remember correctly.

Another problem was that the pages also had inline
style sheets that were inserted in a slot in
standard_template.  These also failed miserably
without macro expansion since they wound up outside
the <head>.

Now granted, you could modify your standard_template
so that even unexpanded pages are valid HTML pages.
however, by default the page slot is just a <div> tag
inside <html> with no body.

Although browsers may render it ok, last I checked
this was not a valid xhtml document:

<html>
<div>
  blah blah blah
</div>
</html>

and this definitely isn't:

<html>
<style>
   foo bar
</style>
<div>
   blah blah blah
</div>
</html>

although again, if you comment the inline style as
recommmended, the page would probably render, but not
the way you wanted it to.

To get around this you would need all of our templates
to explicitly define head and body. This creates
limitations on how the macros/slots can be defined in
standard_template tho...

Now granted, for those of us doing all of our html
coding by hand, we can merrily disregard all of the
above and just preview the pages on the main HTTP
port. 

Now after spouting all this drivel, I think my (and
others) main point is not whether expansion defaults
to on or off in the code. There needs to be some way
to affect this setting globally *without* changing
code, whether you want it on or off, or some new
hybrid setting.

Defaulting it to off will please us developers.
Unfortunately it will befuddle web designers who will
not be able to turn it back on, since they aren't
about to go modify Python code.

-Casey

__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/