Forum: Ruby on Rails How to put multiple contents in one layout?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
5c4533f23a9d7d67ffe1ea5539b4130b?d=identicon&s=25 Magicloud (Guest)
on 2007-04-23 07:25
(Received via mailing list)
Dear all,
    When I used "content_for", I can easily make a page show bot TOC
and text. Now I am using "yield", how to do the same thing?

Thanks.
9d1f5d2d9de70bd9a934f557dc95a406?d=identicon&s=25 Daniel ----- (liquid)
on 2007-04-23 07:29
(Received via mailing list)
On 4/23/07, Magicloud <magicloud.magiclouds@gmail.com> wrote:
>
>
> Dear all,
>     When I used "content_for", I can easily make a page show bot TOC
> and text. Now I am using "yield", how to do the same thing?
>
> Thanks.
>

In your partial use

contet_for :my_section do

end

then in your layout

yield :my_section

I think that should get you out of trouble.
5c4533f23a9d7d67ffe1ea5539b4130b?d=identicon&s=25 Magicloud (Guest)
on 2007-04-23 07:44
(Received via mailing list)
Oh, just like it used to be....
Thanks.
Daniel N дµÀ£º
This topic is locked and can not be replied to.