joined:Feb 11, 2011
Hello, All. First Post.
When I can fit it in, I'm a part-time Webmaster for our organization's site. I am weary of uploading hundreds of pages when I want to change something on the headers or footers.
I have about 3,000 pages of static archives, and 30 or 40 pages that are updated regularly. I'd like to be able to change the header and footer of the whole site once in a while without having to upload every page again.
Would it be too weird to do something like this?
I'm not looking for an examination of my code just yet, just opinions on whether or not it would be a problem to use "document.write ..." for so much.
<link rel="stylesheet" type="text/css" href="../style/styles.css" />
<!-- banner here -->
<!-- a list of links to current content here -->
<!-- content here -->
<p>A couple of thousand words of content would be here, nice and tidy.</p>
<!-- footer here -->
The files "banner.js", "current_links.js" and "footer.js" would be something along these lines:
document.write(' <div id="banner"> MyWebSite Info <a href="../new.htm">NEW STUFF</a> | <a href="../old.htm">OLD STUFF</a> etc., etc. </div> ')
The test that I've done loads like a rocket, is super easy to update, and the code is squeaky clean. It seems TOO easy. What's wrong with the plan?
Thanks for your input.