under
app/views/
create a new folder 'shared'
and create a new file called _menu.rhtml.
'app/views/shared_menu.rhtml'
which contains the menu something like (sorry for the extra spaces only way I could stop it rendering):
< id="menu">
< class="menubar">
< class="menubar">< href="http://127.0.0.1:3000/">Home< / a>< / l i>
< class="menubar">< href="http://www.blogger.com/Posts">Posts< / a>< /l i >
< class="menubar">< href="http://www.blogger.com/Tags">Tags< / a>< / l i>
< / u l>
< / d i v>
Then add <%= render(:partial => "shared/menu") %> to all default layouts. in:'views/layouts/*.html.erb'
No comments:
Post a Comment