Adding the Page Layout

Learn to design a page layout using a separate stylesheet.

We'll cover the following

The pages in a typical website often share a similar layout. The designer will have created a standard template that’s used when content is placed. Our job is to modify this page to add decoration to each of the store pages.

So far, we’ve made only minimal changes to application.html.erb. Namely, we’ve added a class attribute in the previous lesson. Because this file is the layout used for all views for all controllers that don’t otherwise provide a layout, we can change the look and feel of the entire site by editing one file. That makes it feel a little better to put a placeholder page layout in for now. We can always update it later.

Let’s update this file to define a banner and a sidebar:

Get hands-on with 1200+ tech skills courses.