On 16.4.2005, at 02:05, Rob Park wrote:
> On 4/15/05, Michal Koudelka
<mithrandir2003cz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> I create default header for most of my documents and I put it to
>> public/header.html
>
> Do you need this header for other uses, or will you be using it
> exclusively with rails?
>
>> I want to include this header to app/intro/index.rhtml, but I
don''t
>> know
>> how set the path to do it.
>
> If you''re using that header exclusively for rails, you could just
turn
> it into a partial, then call render_partial to include it in the
> header of your page.
And if you need it in more than one controller, create new folder
app/views/shared and save the header file there as _header.rhtml.
In your normal views, you can then call render_partial
"shared/header".
Please note, that it''s probably a bit more elegant to use layouts for
this kind of "common header" things. See
http://rails.rubyonrails.com/classes/ActionController/Layout/
ClassMethods.html for more info on layouts.
//jarkko
>
> --
> Urban Artography
> http://artography.ath.cx
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
--
Jarkko Laine
http://jlaine.net
http://odesign.fi
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails