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

Message boards will no longer be available after July 18, 2024.

We recommend saving any important information beforehand. Going forward, you can stay connected with your groups using the Discussions feature (we'll be rolling out some exciting updates soon)!

Learn more about the upcoming changes in this article;

Custom content in layout sidebars.

From: Sam P.
Sent on: Wednesday, June 20, 2007, 7:44 AM
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.


People in this
group are also in: