Topic: How to include default header and foot template?

How to include default header and foot template?
How can I do that on the most controllers I have?
What way is the most polite to do?

Cheers!

[url=http://websaudavel.com/]Web Saud

Re: How to include default header and foot template?

The easiest way would be to put them right into the top and bottom of app/views/layouts/application.rhtml

If you wanted them to be separate files here's a REALLY simple way.  First, make your header and footer here:
app/views/layouts/_header.rhtml
app/views/layouts/_footer.rhtml

And include the following in application.rhtml:

<%= render :partial => 'layouts/header' if @show_header %>
  <%= @content_for_layout %>
<%= render :partial => 'layouts/footer' if @show_footer %>

Then, in individual controllers you can do this:
class MyController < ActionController::Base
  def index
    @show_footer = true
  end
end

Re: How to include default header and foot template?

Gotcha!
But I already solved this question yesterday (at night on 31/01, here).
I used the layout method.
I create a 'commom' template (commom.rhtml) and moved on.

But, keeping on the subject I would like to know the most semantic way to do this...

Thnaks!

[url=http://websaudavel.com/]Web Saud