thanks, that's cool
On Tue, Jun 23, 2009 at 9:48 PM, Bradley Grzesiak<[email protected]> wrote: > right... the hyphen... don't forget that. > > *slaps forehead* > > nice helper by the way. i look forward to never having to use it because all > browsers are standards compliant (in about 40 years). =) > > :brad > > On Tue, Jun 23, 2009 at 11:46 PM, Chris Eppstein <[email protected]> > wrote: >> >> Like this: >> !!! >> %html >> %head >> %title This is the tile >> - conditional_body do >> %p >> This is text in the body. >> >> -chris >> On Tue, Jun 23, 2009 at 9:39 PM, Noel <[email protected]> wrote: >>> >>> how do you use that? ...n00b >>> >>> On Tue, Jun 23, 2009 at 8:48 PM, Chris Eppstein<[email protected]> >>> wrote: >>> > That's pretty sweet. >>> > chris >>> > >>> > On Tue, Jun 23, 2009 at 8:45 PM, Nathan Weizenbaum <[email protected]> >>> > wrote: >>> >> >>> >> For this sort of thing, I just use a simple string-manipulating >>> >> helper: >>> >> http://gist.github.com/134988 >>> >> >>> >> On Tue, Jun 23, 2009 at 1:11 PM, scottwb <[email protected]> wrote: >>> >>> >>> >>> I bet somebody has a better way, but here's something I've done >>> >>> before >>> >>> - capture the haml and then render it with or without the %body based >>> >>> on your conditional. Not real pretty, but at least the ugliness is >>> >>> mostly just confined to the top and bottom of the file. Something >>> >>> like >>> >>> this: >>> >>> >>> >>> - body = capture_haml do >>> >>> - ...haml for everything in layout... >>> >>> >>> >>> - if request.env['HTTP_USER_AGENT'] !~ /msie/i >>> >>> %body= body >>> >>> - else >>> >>> = body >>> >>> >>> >>> >>> >>> Noel_g wrote: >>> >>> > Following up on this compass thread >>> >>> > >>> >>> > >>> >>> > >>> >>> > http://groups.google.com/group/compass-users/browse_thread/thread/fbe8470caccec27b >>> >>> > >>> >>> > What would be the best way to implement the conditional body tag in >>> >>> > my >>> >>> > HAML layout? >>> >>> > >>> >>> > >>> >>> > >>> >>> > http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ >>> >>> > >>> >>> > I thought I could do >>> >>> > /[if !IE] >>> >>> > %body >>> >>> > /[endif] >>> >>> > >>> >>> > but that doesn't work. On the Compass thread someone mentioned >>> >>> > that >>> >>> > it would need to be done in erb. >>> >>> > >>> >>> > So would I do >>> >>> > >>> >>> > :erb >>> >>> > <!--[if !IE]>--> <body> <!--<![endif]--> >>> >>> > >>> >>> > Is this the best way to do this? >>> >>> >>> >> >>> >> >>> >> >>> > >>> > >>> > > >>> > >>> >>> >> >> >> > > > > -- > Bradley Grzesiak > [email protected] > http://toleoandbeyond.blogspot.com > > * You have received an email from my personal account. Please do not divulge > this address to any website (eg: evite, shutterfly, etc). I have another > address for such uses; please ask me for it. > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Haml" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/haml?hl=en -~----------~----~----~----~------~----~------~--~---
