-
Book Overview & Buying
-
Table Of Contents
CouchDB and PHP Web Development Beginner's Guide
By :
In this section, we'll create a simple layout file called layout.php. Remember that in our render function, there is a default value for $layout, and that is set to layout. This means that, by default, Bones will look for views/layout.php. So, let's create that file now.
1. Start by creating a new file in our views directory called layout.php.
2. Add the following code in the newly created views/layout.php:
<html> <body> <h1>Verge</h1> <?php include($this->content); ?> </body> </html>
We created a very simple HTML layout that will be used in all of our views in the application. If you remember, our render function in Bones uses the path set as the $content variable that we set in the previous function and also includes it, so that we can display the view.
Now that we have all of the pieces in place for views, we just need to add a few lines of code...
Change the font size
Change margin width
Change background colour