How WebTemplate responds to a request from a browser

When a request for a page is sent from a browser to WebTemplate, WebTemplate will:

  1. Check if the requested page exists as a file in the site's folder, if so, then return it
  2. If not, include all the PHP files in the code folder
  3. If a PHP file has registered a function to the URI, then call the function
  4. Try to find a page created in Site Builder matching the page. If the page is not found, return a 404 error
  5. If a page is found, find the Content Layout Template associated with the content and generate it's output
  6. Generate the output for the Page Layout Template and insert the content from the Content Layout Template
  7. Return the output from the Page Layout Template