Add a navigation using partials

Since we have more and more actions now and like everybody else we are lazy, we add a navigation now to our layout HTML file. Then we don’t have to enter the URL for each action anymore, we can just click the correct link.

Create the partial

First we have to create the partial that we include in our layout later.

Include it in your layout

After we created the partial we just have to include it in our layout so that the navigation is available on all pages.

Now you should see the navigation in each of your actions.

It looks ugly

Additional in this step I added some CSS and JS to make it look better. JS is used later when we want to work with jQuery and Ajax.

If the Css and Js files are not loaded, check your permissions and make sure that:

Options Indexes FollowSymLinks

is set in your apache config.

Your homepage now should look like: