A Web Design Community curated by Chris Coyier

#11: Working Modularly with PHP

By: Chris Coyier on: 11/23/2008 with 3 Comments

Many sites do not use any fancy Content Management System (CMS) to generate their pages, they are just just good ol’ static HTML content. A site for your grandmothers pie baking business probably only has a few pages, perhaps a homepage, about page, and contact page. Each of these pages has different main content, but much of it stays exactly the same, like the header, navigation, and footer. Think of these sections as “modules” that you can easily use PHP to insert into the page. This way, making changes to those sections changes all the pages at the same time, saving you time and potentially mistakes. At the end, I show you how you can still achieve unique effects in your navigation despite the code being identical.

Running time: 15 minutes

Direct Download: High Quality, Quicktime .M4V Format (AppleTV Ready)

Get the Flash Player to see this player.

3 Responses

  1. Eduardo says:

    Isn’t is better to use ‘if-else’ instead of that ultra-complex css?

    Love your tutorials ;)

  2. Ryan says:

    Fantastic tutorial Chris! A new breakthrough in the way I think about designing websites!

This comment thread is closed. If you have important information to share, you can always contact me.

* This website may or may not contain any actual CSS or Tricks.