Book Image

Learning Phalcon PHP

Book Image

Learning Phalcon PHP

Overview of this book

Table of Contents (17 chapters)
Learning Phalcon PHP
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Create the base layout


Now, it's time to focus a little bit on the layout (templates). We are going to use twitter-bootstrap for CSS and jQuery. Then, we are going to create first view in order to close this chapter.

Navigate to public/folder and create a folder named assets. Then, go to assets and create a folder named default:

$ cd public
$ mkdir -p assets/default

I am using Bower (http://bower.io/) as a package manager for my assets. It is what composer is for php packages.

If you don't have Bower installed and you don't want to use it, you will need to create a folder named bower_components in your public/default/assets folder and clone twitter-bootstrap repository from GitHub. You will also need to download jQuery and unzip it into the bower_components folder.

$ cd public/default/assets/bower_components
$ git clone https://github.com/twbs/bootstrap.git

If you have Bower, then just go to the public/default/assets folder and install twitter Bootstrap:

$ cd public/default/assets
$ bower...