Nice work, Nick!
...
I used a helper to clean up your syntax a bit:
## layouts/application.rhtml
<html>
<head>
<title>Site name<%= " - [EMAIL PROTECTED]" unless @title.blank?
%></title>
</head>
<body>
<%= yield %>
</body>
</html>
## site/getting_started.rhtml
<h1><%= title_with("Getting started") %></h1>
## helpers/application_helper.rb
def title_with(title)
@title = title
return @title
end
On Feb 23, 2007, at 1:34 pm, Nick Zadrozny wrote:
Bottom line, combining a helper that programmatically generates most
titles but allows you to mix in a manually-set @title instance
variable is definitely possible.
_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby