HTML and CSS Reference
Copying the Stylesheet and Assets to the Proper Directories
Now that the header markup is in place and referencing the stylesheet, you should copy main.css from Chapter 7 into
the assets/styles/ folder. You should also copy the image sprite to assets/images/ .
■ the CSS markup and assets will not be mentioned again or printed in this chapter in the interest of
keeping things moving forward. don't forget to copy main.css from Chapter 7, or else the app will not match the
screenshots to follow.
Building the Home Page
The router is created. The core classes are written. The common markup is ready to roll. All that's left to do is create
the first actual page of the app.
Starting with the simplest page first, let's build the Home page.
Creating the Home Controller
To get started, create a new file in system/controllers/ called class.home.inc.php . Inside, add the following code:
* Generates output for the Home view
* @author Jason Lengstorf <email@example.com>
* @author Phil Leggetter <firstname.lastname@example.org>
class Home extends Controller
* Overrides the parent constructor to avoid an error
* @return bool TRUE
public function __construct( )
* Generates the title of the page
* @return string The title of the page