I have used PHP on the Aber LINKS site to make the site more interactive and maintainable. The main use I have used it for at the moment is server side includes – where some common code across many pages is pulled from just one file. This means the code is written just once, and only has to be modified once to affect all pages. I also created a “template” page – with the headers, footers, nav bar, menu and main area all set out ready to receive content. This allows for easy page adding whilst keeping all pages consistent.
Adding a new page
How hard is it? It’s only as hard as you make it. Using PHP, it can be really easy and I follow the following steps with my site:
- Make a copy of my template page
- Add the content into the main area for the new page
- Update the menu and nav bar includes to include the link to the new page
- Upload the new page, and updated nav bar and menu.
[It is worth saying at this point, when I refer to Aber LINKS - I do mean Aberystwyth LINKS (St John Cymru - Wales First Aid Society at Aberystwyth University), just in case another place gets a LINKS unit (Aberdeen, Aberdovey etc) and calls themselves Aber LINKS. ]