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
On Tue, Jun 23, 2009 at 1:11 PM, scottwb <scot...@gmail.com> 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
On Tue, Jun 23, 2009 at 8:45 PM, Nathan Weizenbaum <nex...@gmail.com> 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 <scot...@gmail.com> 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
>> On Tue, Jun 23, 2009 at 1:11 PM, scottwb <scot...@gmail.com> 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
> >> On Tue, Jun 23, 2009 at 1:11 PM, scottwb <scot...@gmail.com> 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
* 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.
> >> On Tue, Jun 23, 2009 at 1:11 PM, scottwb <scot...@gmail.com> 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
>> >> On Tue, Jun 23, 2009 at 1:11 PM, scottwb <scot...@gmail.com> 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
* 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.
On Tue, Jun 23, 2009 at 9:48 PM, Bradley Grzesiak<listro...@gmail.com> 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 <ch...@eppsteins.net>
> 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 <wwydi...@gmail.com> wrote:
>>> how do you use that? ...n00b
>>> On Tue, Jun 23, 2009 at 8:48 PM, Chris Eppstein<ch...@eppsteins.net>
>>> wrote:
>>> > That's pretty sweet.
>>> > chris
>>> > On Tue, Jun 23, 2009 at 8:45 PM, Nathan Weizenbaum <nex...@gmail.com>
>>> > 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 <scot...@gmail.com> 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
> * 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.