templates + includes = efficiency

Updating or just maintaining a website can be a daunting task, encouraging procrastination in the most seasoned designer. To combat this dilemma, I’ve implemented a combination of HTML templates and PHP includes to significantly accelerate website change. Although not applicable to every site, these pieces of web pages can usually be siphoned off into include files:

  • Headers or banners
  • Menu or links bar
  • Sidebar (if not included above)
  • Footer

To create include files, I simply put the code required for each piece in its own file with a .inc extension (i.e. header.inc). To link to it in the base document, add this line – <?php include(“file.inc”); ?> – where the code in file.inc would normally be. Assuming you’ve inserted the correct information between the quotes, your code in the include file will appear in place of the php line (view source code to see this, or to see the error generated if you’re having problems).

The benefits of includes…heheh…include the ability to update many files with one physical change, and also that you don’t have to update and re-upload all of your files attached to a template. Simply re-upload your include file and all changes nicely.

I take this simple include idea a step further by inserting these into templates rather than individual HTML files. That way I can increase my coding efficiency and minimize errors (and thus time spent fixing errors). I’m all about efficiency, so ideas like these just tickle me pink.

Add comment September 17th, 2006

IE .png fixes

As we’re all well aware, Internet Explorer has a bad habit of interpreting code differently from both web standards and most other browsers. Unfortunately the majority, albeit waning majority, of internet users still use IE so we as designers and coders cannot simply ignore the browser as a whole.

Therefore, since IE pre-7 does not support .png transparency, I hunted down 2 very nice javascript fixes for this problem. The first came from this site, but it doesn’t work for CSS-based background-images. I found this article at Flopi Design that solved my remaining problem. By adding the javascript function at Flopi Design to the pngfix.js file from the first site, all of my .png transparency issues were resolved.

Add comment September 7th, 2006

Hello World!

Ahhh, the first two words (nearly) all aspiring programmers delight to see appear on their screens…success!

Welcome to titan design studio, my new (to you) design site. Here a great adventure begins…in 20 years, I’ll be perched somewhere looking back at this moment. Won’t that be fun?!

For now, however, its time to roll up my sleeves and get dirty. Take a peek at my work and, if you like it, contact me and we’ll discuss time frame, project scope, and pricing.

1 comment September 5th, 2006

categories design links feeds