On 2/23/07, Chris Abad <[EMAIL PROTECTED]> wrote:
I think the problem here is that your page title value is going to need to
be evaluated as one of the first items in your view... so you can't really
define the page title in your view.

Actually, I just tested this to be sure. Instance variables you set in
the view are available to the layout. I'm not going to think too hard
about how it all works, though. Some sort of ruby-fu with blocks and
yield.

Here's my test code:
http://p.caboo.se/42538

It also works just fine if you're using @title from a helper called by
the layout.

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.

--
Nick Zadrozny • http://missionsbridge.org/people/nick
_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby

Reply via email to