Access Menu options

Old Menu Explanation

This page will explain to you roughly how the old menu system on this site worked.

to start with the menus themselves are a csv file which tells the program how to handle the links the one that is in the tech demo area (or submenu) looks something like this

techdemos,D,techdemos/index.html flash,S,techdemos/flash1.html about menus,S,techdemos/menus.html back to main,I,topindex.csv

The menu template splits this into 3 columns; the first is the name to display, the second is a code telling it what type of link to make, and the third says what to link to

When you click on a menu item (most of the time), you will call the menu script again and tell it which item number you want. This is item number 3 (the first default item is the default item and dosn't need a number)

The Menu.php template will find the file corrisponding to this on the server (in this case menus.html) and it will parse it using a class called KHP (Klunky HTML Parser) this will seperate the file into various header feilds (title,meta tags, ect) and store them along the whole of the <BODY> section of the file in easy to access variables

Menu.php then includes a template file (which can vary but at present I only have one) this is the HTML template for the page that is displayed here. This can optionaly include any of the header feilds in the original HTML file. So you could include the JavaScript and Title but use different metta tags.

The template file should include calls to a generate menu function and display body function. Having these as functions in a template like this meens that the layout is independant of the underlying code.

note

At some stage I should do a diagram and put it here to help explan. Once it is a bit cleaner I will post the code as well