This isn't what you're looking for, but a suggestion on the current
syntax:
<%= " -- [EMAIL PROTECTED]" unless @title.blank? %>
On Feb 23, 2007, at 11:58 AM, Patrick Crowley wrote:
When I need to set the title for a page (not inline... the one that
appears in your browser's window bar), I usually do something like
this...
def news
@title = 'News'
end
And in my main layout...
<head>
<title>My web app<% if @title != nil %> -- <%= @title %><% end %></
title>
</head>
So, this way, you can set an optional title for actions that need
one. Works pretty well, but I'd prefer not to clutter up my
controller code with all those titles.
Can you guys think of a way to grab the page title from an inline
<h1> and then map that to @title?
-- Patrick
_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby
_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby