addressalign-toparrow-leftarrow-leftarrow-right-10x10arrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscontroller-playcredit-cardcrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobe--smallglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1languagelaunch-new-window--smalllight-bulblightning-boltlinklocation-pinlockm-swarmSearchmailmediummessagesminusmobilemoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonprintShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstar-shapestartickettrashtriangle-downtriangle-uptwitteruserwarningyahooyoutube

Re: [ruby-81] Custom content in layout sidebars.

From: Billy
Sent on: Wednesday, June 20, 2007, 10:08 AM
This is the nested layout plugin I was referring to, in the event that the sidebar starts taking on markup:

http://rubyforge.org/projects/nested-layouts/

-Billy K

On 6/20/07, Sam Pierson <[address removed]> wrote:
Regarding Ivan's problem - custom sidebar content in layouts, here is a solution I found on the way home:

Agile Development with Ruby on Rails, Section 22.9, Passing Data to Layouts, Page 508:

The same mechanism that lets you use
yield :layout to embed the rendering of a template into the layout also allows you to generate arbitrary content in a template, which you can then embed in any template.

For example, different templates may need to add their own template-specific items to the standard page sidebar. We'll use the
content_for mechanism in those templates to define content and then use yield in the layout to embed this content into the sidebar.

-Sam.






--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ( [address removed])
This message was sent by Sam Pierson ([address removed]) from The East Bay Ruby Meetup Group.
To learn more about Sam Pierson, visit his/her member profile
To unsubscribe or to update your mailing list settings, click here

Meetup.com Customer Service: [address removed]
632 Broadway New York NY 10012 USA

People in this
group are also in: