I think what you need is content_for.

http://api.rubyonrails.org/classes/ActionView/Helpers/CaptureHelper.html#method-i-content_for

On Sun, Feb 20, 2011 at 12:38 AM, Bhasker Harihara <
[email protected]> wrote:

> Hi Collin,
>
> I use application.html.erb to do my styling (span-1 to span-24) and divide
> it into various sections.  Namely, logo, header1, then col1, Content area,
> col2 then footer.
>
> Now assume, I have 10 pages (all static) which is from menu->submenu.
>
> When I click on menu ->submenu -> item then I want the description to be
> displayed in the content area.  Which I achieved by doing <%= yield %>.  All
> fine.
>
> Now I want image 1 to be in col1 and corresponding content in body when the
> appropriate selection is done.  Like that for all 10 selections (which could
> come from submenus).
>
> I am not able to get the correct image and the correspoding content
> displayed.
>
> Hope I have explained it better.
>
> Thanks & Warm Regards,
>
> On Sat, Feb 19, 2011 at 9:52 PM, Colin Law <[email protected]> wrote:
>
>> On 19 February 2011 15:31, Bhasker Harihara <[email protected]>
>> wrote:
>> > Hi All,
>> >
>> > I am using blueprint framework for my UI design.
>> >
>> > I have a set of static pages which I have displayed at the correct
>> location
>> > using <%= yield >.
>> >
>> > Now I want to place a image for each of those static pages at a
>> different
>> > location.  say <div class="images" or id="image" >
>>
>> I don't understand what it is that you do not know how to do.  If you
>> want an image in a div with appropriate class just do
>> <div class="images"><%= image_tag('your_image.png') %></div>
>> or you could put the class on the image itself
>> <%= image_tag( 'your_image.png', :class => 'images' ) %>
>>
>> Colin
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Ruby on Rails: Talk" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>



-- 
-------------------------------------------------------------
visit my blog at http://jimlabs.heroku.com

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to