Spreading <Head> across multiple files using php
Hello,
This is my first post, please excuse any errors in posting procedure!
I am working on a site with a main .php generated page that 'includes' other htm pages into a 'main content' div.
I am adding more and more javascript <script> sections to the header to satisfy the requirements of the various 'included' htm pages that have flash and java script stuff on them.
Should I just put all the various permutations of <head> content into a switch/case structure in the <head>?
I want to only have things in the <head> that are required for the current included .htm 'maincontent' file. Should I do this by having a head_xxx.htm file for each htm file and a bit of php to include this in the <head> section of the main page? This seems cumbersome as twice as many files will exist.
Is there a way to include part of a file at one point (<head>) in the front page (via php) and include another part of(<body>) it at a different point? i.e. have head and body code (without the tags) in a htm file and pull the appropriate parts into the main file depending on the current 'maincontent' page. This seems unlikely to be the correct way!
Thanks in advance to anyone that takes the time to help me out.
Richard
|