Dynamic Website Template

A simple template-based script for dynamic websites written in PHP.

Download: N/A


  1. Unpack the zip file in your webserver directory (eg. /home/you/www/)
  2. Edit config.php to your needs.
  3. Copy all your content files (files you want to be dynamically loaded) into the your PATH_CONTENT directory, which is /home/you/www/content/ by default.
  4. For each content file add an entry in the definitions source from above:
    1. FF: For syntax information please refer to dwt/definitions.php.
    2. DB: please refer to the dwt_initial.sql for structural info.
  5. Call index.php to use your shiny new dynamic website


Everything you need (or can) configure can be found in dwt/config.php.


Have a look at the sample index.php. The most important functions you will need are:

  1. displayContent(): loads page specified by id
  2. displayNavigation(): loads navigation file specified in config.php

e.g. http://www.you.com/index.php?id=12

This request will load the page specified in dwt/definitions.php with ID 12.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.