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 <[EMAIL PROTECTED]>
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 [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