hello i want to use frame in RoR …
how to create frame in RoR?
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:
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 R. [email protected]
Dharmdip R. 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.
thanks ! i want specific content for each n every frame !
is it possible ? to get dynamic content for each n every content ?
Ar Chron wrote:
Dharmdip R. 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