Understanding the Roots base template
One of the impressive things about the Roots theme is that it has pulled the fundamental layout elements out of individual template files and placed them into a file named base.php
. We'll look at this in just a moment.
First, let's notice that the base.php
file receives instructions on fundamental layout matters from the config.php
file inside the lib
folder. Take a moment to open this latter file and scan through it. I will not touch upon everything here. You can read more about the details in the following two pages in the Roots documentation:
The Roots 101 page at http://roots.io/roots-101
The An Introduction to the Roots Theme Wrapper page at http://roots.io/an-introduction-to-the-roots-theme-wrapper/
For present purposes, note that we have the ability to specify what class should be put on the main column and the sidebar as well as to determine the pages that should not have a standard sidebar.
If you search for the phrase main class
, you'll find lines...