Download my FilesFeel free to download all my files and use them to follow along…just don’t distribute or sell them. If you end up publishing them, an attribution would be nice (aka necessary).

I’m assuming you already uploaded the CI files on your server. Now, copy the css, js, and images folders from my production files and paste them in the code igniter folder. Your structure should look like this:

Setting up the views

Right now, think in terms of php includes. We want all the global elements to be in their own file. For example, the footer will appear on all the pages. So, the footer’s code goes in its own file (footer_view.php). All the pages on the site will reference that one footer file. Now, if we have to make any changes, we only have to update the code in one place.

On almost all my sites I have a page header, a page top, and a footer.

Create a new file in the system > view folder. Call it page_top_view.php and paste our code.

Go back to index.html and copy all the code beginning with the comment “page content” to the “footer” comment.

<!-- PAGE CONTENT -->
<div class="span-13 prepend-8 append-3 last">
<div class="post">
<div class="date">06.21.2010</div>
<h2 id="write_at_least_5_comments_on_a_5_different_blogs_a_day"><a href="#">Write at least 5 comments on a 5 different blogs a day</a></h2>
<p><a href="#">5 Comments</a> || Posted in <a href="#">leadership</a> by <a href="#">Darrel</a></p>
<p>I went and looked at my stats on Friday afternoon. Where am I getting the most hits? From blogs that I had posted comments on. I don’t know why this surprised me. Everything I read about blogging says “to increase your traffic, post meaningful comments on other people’s blogs”. I think I’ll surprise myself, though. If I’m all about “the conversation,” I don’t think it will be as much about sending people to my site, as it will be continuing a conversation on someone else’s site. And that’s OK.</p>
</div>
<div class="post">
<div class="date">06.20.2010</div>
<h2 id="fix_the_holes"><a href="#">Fix the holes</a></h2>
<p><a href="#">2 Comments</a> || Posted in <a href="#">making money</a> by <a href="#">Rick</a></p>
< an>p>When I launched my redesign, I knew that there were still holes. I went with the 37 signals method: get something up as soon as possible. Now, I need to go back and tweak, finding the places where the user interface isn’t quite clear, fixing the bugs, and all around, just make things better. Shout out to all who have given me insight. Thanks!</p>
</div>
<div class="post">
<div class="date">06.20.2010</div>
<h2 id="fix_the_holes"><a href="#">Fix the holes</a></h2>
<p><a href="#">2 Comments</a> || Posted in <a href="#">making money</a> by <a href="#">Rick</a></p>
<p>When I launched my redesign, I knew that there were still holes. I went with the 37 signals method: get something up as soon as possible. Now, I need to go back and tweak, finding the places where the user interface isn’t quite clear, fixing the bugs, and all around, just make things better. Shout out to all who have given me insight. Thanks!</p>
</div>

Create a new file in the system > view folder. Call it blog_listing_view.php and paste our code.

Go back to index.html and copy all the code beginning with the comment, “Footer” to the end.