Hello again,
Basically, I was wondering if it was possible to render partials in HAML, like with SASS's @import functionality for a local, static site.
The code is:
%h2 Footer Lorem Ipsum
= render :partial => "footer/_foo.haml"
With the file "_foo.haml" located in the folder footer. _foo.haml contains valid HAML (rendered properly, then cut and pasted out of the index and into the new partial document).
I'm using CodeKit to render my HAML, and receive one of the two error messages, depending on whether or not I indent with a tab:
undefined method `render' for #<Object:0x10c4ce1d8>
or
Illegal nesting: content can't be both given on the same line as %h2 and nested within it.
Is there something obvious I'm missing out on? And sorry if this reads weird. I've done a little searching on Google/Stack Exchange, I'm not a programmer by trade/don't know Ruby, and I'm a little
shaky on the right terminology, so I'm not 100% if I'm phrasing the
searches properly.