[Seaside] Comment Tag in Head Tag

Avi Bryant avi.bryant at gmail.com
Wed Jun 29 16:41:04 CEST 2005


On 6/22/05, Jan Angermair <sentorsa at gmail.com> wrote:
> I having a bit of trouble trying to write a semi valid html tag into
> the head tag of the document. The reason for this is to introduce a
> 'Conditional comment' to deal with an IE bug. For reference see
> http://www.quirksmode.org/css/condcom.html
> 
> The exact html that I'd need in the header looks like:
> 
> <!--[if lt IE 7]>
> <style type="text/css">
> .someClass {}
> </style>
> <!--[if lt IE 7]><![endif]-->
> 
> As you can see the open and end tag do not behave like standard html.
> Is there a method to write just a string anywhere into the document? I
> have been playing with updateRoot and addHeadElement but no luck so
> far.

Hi Jan,

Sorry not to reply sooner.

Probably the best thing for you to do is to write a custom subclass of
WAHtmlElement that can produce the kind of conditional comment you
need (it doesn't necessarily even need to be a subclass, anything that
implements #writeOn: should work).  Then you can use #addHeadElement:
with that. If you do it in a fairly general way, it will probably be a
useful extension we can integrate in.

Thanks,
Avi


More information about the Seaside mailing list