hello i want to use frame in RoR .. how to create frame in RoR? Attachments: http://www.ruby-forum.com/attachment/2701/frame_example.JPG -- Posted via http://www.ruby-forum.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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi, The normal way is to define the general structure of your page in the layout (layouts/application.html.erb). For simple sites, you just use one layout for all your views, so if you use script/generate to make your controllers, remove the automatically generated layouts for each controller. Your layout would contain the various pieces of the page: <body> <div id="header"> some common content here. logo, title, etc... use variables like <%= pagetitle %> that are set in your controller/actions </div> <div id="left_nav"> this is your left navigation menu <%= render :partial => shared/menu %> to render _menu.html.erb %> </div> <div id="main"> This is the content for the view being called <%= yield %> </div> <div id="footer"> <%= render :partial => shared/footer %> </div> If you have specific content that needs to be displayed in one of your ''frames'' depending on the main view, you can call this in your view: <% content_for :left_nav %> some specific content here <% end %> and you should call <%= yield :left_nav %> in your layout. Finally in your css you define the positioning/styling of your various layout divs. On 17 sep, 09:27, Dharmdip Rathod <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> hello i want to use frame in RoR .. > how to create frame in RoR? > > Attachments:http://www.ruby-forum.com/attachment/2701/frame_example.JPG > > -- > Posted viahttp://www.ruby-forum.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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
thanks ! i want specific content for each n every frame ! is it possible ? to get dynamic content for each n every content ? -- Posted via http://www.ruby-forum.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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Dharmdip Rathod wrote:> thanks ! i want specific content for each n every frame ! > is it possible ? to get dynamic content for each n every content ?Surely. content_for just routes the output to the appropriate named div. Individual views can use or ignore divs as they see fit, depending on what they are to render. The app template is just that. If your template includes empty placeholders for all the different content snippets, you just use the suggested content_for construct and send the rendered data to the appropriate div. -- Posted via http://www.ruby-forum.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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ar Chron wrote:> Dharmdip Rathod wrote: >> thanks ! i want specific content for each n every frame ! >> is it possible ? to get dynamic content for each n every content ? > > Surely. content_for just routes the output to the appropriate named > div. > > Individual views can use or ignore divs as they see fit, depending on > what they are to render. > > The app template is just that. If your template includes empty > placeholders for all the different content snippets, you just use the > suggested content_for construct and send the rendered data to the > appropriate div.thx ! chron -- Posted via http://www.ruby-forum.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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---