Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: 386f264d9c
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (21 sloc) 1.191 kB
= Share Layouts
Created by: Sean Cribbs (seancribbs AT gmail DOT com), September 20, 2007
Allows Rails controllers/actions to use Radiant layouts as their "layout".
content_for blocks are mapped to page parts, with the exception of :title and
:breadcrumbs, which map to their specific default tags. The default content,
or @content_for_layout, is mapped to the 'body' part.
== What to do in your controllers
radiant_layout 'Layout name'
radiant_layout { |controller| # some code to determine layout name }
radiant_layout takes the same options as the built-in layout. To specifically
override the Radiant layout and use a standard Rails one use
:layout => "mine", or :layout => false for no layout, as options to render.
To choose a different Radiant layout, set the @radiant_layout instance
variable to the name of a Radiant layout in your controller or view.
== Acknowledgments
Thanks to John Long for clarifying and simplifying the process for me!
Thanks to xtoddx for improving the tests and support for tags that use the
request and response.
Thanks to Digital Pulp, Inc. for funding the initial development of this
extension as part of the project.
Jump to Line
Something went wrong with that request. Please try again.