Simplifying template changes…


March 15th, 2007
Comments Off

In programming my website, I have broken each component down into their individual sections. By this I mean that I have simplified the ability to update an area of the website by simply changing one file. Here is how my file structure works :

  1. Header module
  2. Footer module
  3. Sidebar module
  4. main content

The sections above shouldnt really require any explanation. By modularizing how the webpage is created I can then ensure that any changes I wish to implement in the future are made all the easier – because I simply have to update one file.


When I wish to use a section in a new page – all I have to do is place the following code in the .php file :

  • <?php include ‘./header.php’; ?>

Very easy.

This approach to web programming is already paying off for me. In order to implement some search engine optimization (SEO) principles I am currently working towards changing the page title, description and keywords for each page.

Using a header module makes this very simple. Originally the header section of each page outputs the same page title, description and keywords for each page it is included in (i.e all pages ;-) .

All I have to do is detect the the current page call and alter the page details accordingly. This should make my webpages a lot clearer to the web spiders when they are crawling my pages.

SEO is very important in ensuring that your webpage is returned when people make a search on google, yahoo or msn – so I am trying to implement as many techniques as possible to increase my organic user throughput.

Comments Off

Categories: SEO, Website

Comments are closed.

"Thought leadership is how winners are differentiated in business."