Chris Eppstein wrote:
Haml really isn't designed to be used outside the context of a
framework. It has no concept of layouts or partials/includes. If you
want to stay DRY then you need to find a framework of some sort that
provides those facilities.
I completely agree. I am in the prototyping stage at the moment so I am
faking the partials and includes.
Thank you for all your helpful responses.
Chris
On Thu, Jan 21, 2010 at 1:17 PM, Amy L <amster.ams...@gmail.com
<mailto:amster.ams...@gmail.com>> wrote:
So for every controller that has views you would have to
essentially make copies of the layout file?
The reason I started doing header partials and footer partials
separate was because each page needs to set different titles and
include different CSS/JS. I couldn't have the one-layout-fits-all
or the one-header-fits-all. I was frustrated having to push my
<title> strings down into the controllers. This way I can do
something like:
= render :partial => 'shared/page_header', :locals =>
{:page_title => 'Your account'}
On Thu, Jan 21, 2010 at 1:13 PM, Alex Wallace
<alexmlwall...@gmail.com <mailto:alexmlwall...@gmail.com>> wrote:
Use one wrapping layout file and then 2 partials for each
section, e.g.
!!!
%html
%head= render :partial => "header"
%body= render :partial => "body"
All nice and tidy, and the partials dont have to worry about
opening or closing their wrapping tags.
On Thu, Jan 21, 2010 at 4:11 PM, Amy L
<amster.ams...@gmail.com <mailto:amster.ams...@gmail.com>> wrote:
Can you give an example of a "good" practice?
On Thu, Jan 21, 2010 at 1:10 PM, Chris Eppstein
<ch...@eppsteins.net <mailto:ch...@eppsteins.net>> wrote:
Don't do that. See previous reply.
On Thu, Jan 21, 2010 at 1:09 PM, Amy L
<amster.ams...@gmail.com
<mailto:amster.ams...@gmail.com>> wrote:
I have this exact setup: separate header and
footer files. What I usually do is just escape the
tags:
\<html>
%head
... head stuff here ...
\<body>
then in the footer
.my-footer-div
... blah blah ...
\</body>
\</html>
Amy
On Thu, Jan 21, 2010 at 1:04 PM, Michael Narciso
<narke...@gmail.com <mailto:narke...@gmail.com>>
wrote:
Is there a way to tell HAML to leave a tag open?
For example I have 2 partial files, a header
and a footer. If I use
HAML on the header it will automatically close
<HTML> and <BODY> in
the header file.
--
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
<mailto:haml@googlegroups.com>.
To unsubscribe from this group, send email to
haml+unsubscr...@googlegroups.com
<mailto:haml%2bunsubscr...@googlegroups.com>.
For more options, visit this group at
http://groups.google.com/group/haml?hl=en.
--
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 <mailto:haml@googlegroups.com>.
To unsubscribe from this group, send email to
haml+unsubscr...@googlegroups.com
<mailto:haml%2bunsubscr...@googlegroups.com>.
For more options, visit this group at
http://groups.google.com/group/haml?hl=en.
--
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 <mailto:haml@googlegroups.com>.
To unsubscribe from this group, send email to
haml+unsubscr...@googlegroups.com
<mailto:haml%2bunsubscr...@googlegroups.com>.
For more options, visit this group at
http://groups.google.com/group/haml?hl=en.
--
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
<mailto:haml@googlegroups.com>.
To unsubscribe from this group, send email to
haml+unsubscr...@googlegroups.com
<mailto:haml%2bunsubscr...@googlegroups.com>.
For more options, visit this group at
http://groups.google.com/group/haml?hl=en.
--
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
<mailto:haml@googlegroups.com>.
To unsubscribe from this group, send email to
haml+unsubscr...@googlegroups.com
<mailto:haml%2bunsubscr...@googlegroups.com>.
For more options, visit this group at
http://groups.google.com/group/haml?hl=en.
--
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
<mailto:haml@googlegroups.com>.
To unsubscribe from this group, send email to
haml+unsubscr...@googlegroups.com
<mailto:haml%2bunsubscr...@googlegroups.com>.
For more options, visit this group at
http://groups.google.com/group/haml?hl=en.
------------------------------------------------------------------------
--
You received this message because you are subscribed to the Google
Groups "Haml" group.
To post to this group, send email to h...@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.
--
You received this message because you are subscribed to the Google Groups
"Haml" group.
To post to this group, send email to h...@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.