home page button
site layout button
control structures button
string functions button
user input button
midterm button
state information button

Structure of a Dynamic Website Template

dynamic image graphic

A template using php relies on the use of include files. The programmer will construct files of the site broken up into parts, such as, the navigation, the footer, the display header and a dynamic content section. These are added to the index page with an inc prefix to the name of the files, example "inc_home_page.php". This links the include files into the page structure, the page then pulls the page information from the include files and displays it in the index.

When a user clicks on a button or navigational link, the programmer can construct the page so the content of one section is reloaded while the rest of the page is not. This can significantly cut down on load time as well as the amount of coding a programmer is required to do.

The dynamic content is generally switched out using, surprise surprise, a switch statement which checks for the page name that the user selected when clicking on the navigational button.

An Example of the structure of a dynamically generated website is shown in the graph to the right