Hey Guys,

I got it.

BUT,

Though the image was in images directory, I did ../../../public/images/*.png
it did not work.

Then I gave the absolute path.  "/home/.../*.png" it did not work.

Then I just tried image.png " It worked perfectly"

Thank you for your help.


On Sun, Feb 20, 2011 at 5:35 PM, Bhasker Harihara <
[email protected]> wrote:

> Jim & Collin,
>
> The link was useful but could not get the yielding part till I saw Collin's
> mail.
>
> But, my tag name appears and not the image.  Will it matter if I have a
> background image loaded.
>
> Regards,
>
>
> On Sun, Feb 20, 2011 at 2:11 AM, Colin Law <[email protected]> wrote:
>
>> On 19 February 2011 17:22, Bhasker Harihara <[email protected]>
>> wrote:
>> >
>> >
>> > On Sat, Feb 19, 2011 at 10:41 PM, Colin Law <[email protected]>
>> wrote:
>> >>
>> >> On 19 February 2011 17:02, Bhasker Harihara <
>> [email protected]>
>> >> wrote:
>> >> > Hi,
>> >> > I don't understand your question.
>> >> > Actually, I have some text in in text(1...10).html.erb and for each
>> of
>> >> > these
>> >> > files I have image(1..10).  Whenever I load text(1..10) in content
>> area
>> >> > I
>> >> > want to load the image(1..10) in col1 area.
>> >> > ie.  if text1 is in content area then I want image1 in col1 area
>> >> >        .............
>> >> >       ..............
>> >> >      if text10 is in content area then I want image10 in col1 area
>> >>
>> >> Please don't top post, it makes it difficult to follow the thread.
>> >> Insert your reply in the previous message at the appropriate points.
>> >> Thanks
>> >>
>> > Sorry for topping and thank you for your quick reply.
>> > I have the following lines in my application.html.erb
>> > ......
>> > ...
>> >     <col1>
>> >          I have to get the image1 here
>> >     </col1>
>> > ......
>> > ....
>> >     <content>
>> >           <%= yield %>
>> >     </content>
>> > ..........
>> > ........
>> > Now, how do I use yield:content and yield:col1
>>
>> Did you do a bit of googling and checking the docs?
>>
>>     <col1>
>>          <%= yield :col1
>>     </col1>
>>  ......
>>  ....
>>     <content>
>>           <%= yield :content %>
>>     </content>
>>
>>
>> Then in the file you are yielding to
>>
>> <% content_for :col1 do %>
>>  <%= image_tag .... or whatever %>
>> <% end %>
>>
>> <% content_for :content do %>
>>  some other stuff
>> <% end %>
>>
>> Colin
>>
>>
>> > Warm Regards,
>> >
>> >>
>> >> I think Jim is probably right, content_for may be what you want, in
>> >> conjunction with multiple yield statements
>> >> yield :content
>> >> yield :col1
>> >> or something like that.
>> >>
>> >> Colin
>> >>
>> >> > Regards,
>> >> > On Sat, Feb 19, 2011 at 10:13 PM, Colin Law <[email protected]>
>> >> > wrote:
>> >> >>
>> >> >> On 19 February 2011 16:38, 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.
>> >> >>
>> >> >> What html are you trying to generate?
>> >> >>
>> >> >> Colin
>> >> >>
>> >> >> > 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.
>> >> >> >
>> >> >>
>> >> >> --
>> >> >> 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.
>> >> >
>> >>
>> >> --
>> >> 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.
>> >
>>
>> --
>> 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.

Reply via email to