14 August 2009

Documenting and Using templates for addtional pages

Now that we have played around with ideas and settled pretty much on what pages in particular sections should look like in general, I am beginning to document how the pages are constructed. After consulting with Maria Youngman, IRT Webmaster, I noted that I can use more php includes than I thought of doing originally on the sub pages.
Note: The homepage really stands alone but I can use some of the same includes to make it a cleaner page.
Before I go any further, I need to explain to those who might not know... In order to use templates that contain php includes, you must get the file itself from the server via ftp. Simply saving a web page file from a browser will not work. Once a page is displayed in a browser, the includes are deployed and one sees the code that the included file contains rather than the include statement itself. (See an example in the comments to this post.)

I've created the first template with comments (subPageTemplate-LeftRightCols.php) to be used when creating new pages that will use the two column style with a left navigation bar, e.g., most of the HELP pages like "ask.php." I've loaded the Includes files in the root directory and I will place the template files like this one in a folder called /Templates2009/.

The Includes files have also been placed in a subfolder (subpages) within the /Templates2009/ to identify and store them. They are currently:
  • topsection4.php
  • MetaStyleScript-sub.php
  • Message-sub.php
  • footer-other.htm
  • PageTracker-sub.php
I plan to turn the template files themselves into documents to be used for training possibly using colors and highlighting to enhance readability. The comments are already in the files.

1 comment:

MPeloquin said...

Note: I am using brackets instead of the actual < > so that you can see the code.

Instead of seeing the include statement itself, e.g.,

[[?php include("http://someserver.edu/PageTracker-sub.php"); ?]]

you see the code generated by the statement, this example:

[[!-- Script used to track and log page hits. --]]
[[script src="http://www.google-analytics.com/urchin.js" type="text/javascript"]]
[[/script]]
[[script type="text/javascript"]]
_uacct = "UA-354599-1";
urchinTracker();
[[/script]]