New Screencast: Working Modularly With PHP
Many sites do not use any fancy Content Managment 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.









1
I always thought using templates in Dreanweaver was the way to go until I decided to try this PHP technique when building http://www.stephanietabram.com.au. I’m a convert!
Comment by Graham Bannister — March 28, 2008 @ 12:20 pm
2
nice tutorial, can you tell where i can download your editor, this one is cool to but on http://www.mediatemple.net i can’t find a download link or something like this, thanx
Comment by Daniel — March 29, 2008 @ 10:53 pm
3
@ daniel:
http://www.panic.com/coda/
Comment by V1 — March 30, 2008 @ 2:43 am
4
Thank you
Comment by Daniel — March 30, 2008 @ 5:24 am
5
Thanks for the new video, looking forward to seeing it. Keep it up
Comment by Tobey — March 31, 2008 @ 3:51 am
6
Good tutorial, but I prefer using only one php-file instead of three…
Just take a look at this.
(ed. I posted this on a page for easier viewing -Chris)
P.S. I know that this is not perfect php-code, but I tried to keep it simple so everybody can understand the idea of putting three pages in only one php-file.
Comment by Edwin — March 31, 2008 @ 6:48 pm
7
Yes, the tutorial is very helpful for me, too. Than’s for your work and sharing.
Ralph
Comment by Ralph — April 5, 2008 @ 2:16 pm