On Wed, Mar 16, 2011 at 04:46, andoriyu <andor...@gmail.com> wrote:

>
> It there any way to include haml in haml? For example, I have 5 views,
> so all of them have same header and footer, and I don't want to change
> that part in every view, i just want to change it once in one place.


There are many ways to make a rendering system that supports "layouts" (i.e.
one template that wraps another).

Here is a simple implementation that supports mixed Haml and Erb templates:
https://gist.github.com/879575

It operates with the `yield` keyword like other popular layout
implementations (StaticMatic, Rails, Sinatra).

I wouldn't recommend doing this by hand, however. For static websites I
would definitely suggest StaticMatic like Matija did.

-- 
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to haml@googlegroups.com.
To unsubscribe from this group, send email to haml+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/haml?hl=en.

Reply via email to