First of all, you should probably be using = rather than #{}-ing the entire
line.Second, Haml doesn't have any built-in partial rendering. If you want to do that, you should either write a helper or use a framework that provides one for you. On Mon, Oct 12, 2009 at 12:33 AM, Lars Olsson <[email protected]> wrote: > > Hi, > > I've just started playing around with Haml and I think it makes my > templates look beautiful and simple compared to my regular templating > engine (Nagoro). However, I need to include a Haml file in another and > the following code looks ugly as hell. There must be a better way, > right? (And no, I'm not using Rails.) > > # one.haml > %html > %head > %title Testing HAML > %body > %p > This is HAML document > %strong one.haml > #{::Haml::Engine.new(File.read('two.haml'), instance_variable_get > (:@haml_buffer).options).render} > > # two.haml > %p > Included by > %strong two.haml > > /lasso > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
